Pregunta de entrevista de Celebal Technologies

Why do we use stack data structure for DFS?