Pregunta de entrevista de JUSPAY

Question 3 based on tree and graph difficult