bp Interview Question

Graph based coding problem. Should know how to traverse the graph. Was given around 110 minutes to solve the problem.