Pregunta de entrevista de Amazon

Leet code medium questions. graph and tree specifically