Pregunta de entrevista de Lifesight

Design Pattern Coding question around Graph traversal