Cognizant Interview Question

Tree questions, graph questions, stack