ABCXYZ interview question

Graphs, Trees, DATA Structures & Algo