Pregunta de entrevista de Computer Age Management Services

Graph question associated with Tree and DP questions