Pregunta de entrevista de Appian

Graph and recursion coding questions.