Pregunta de entrevista de K L University

DSA question on depth first search