Pregunta de entrevista de Thermo Fisher Scientific

How would you write code to recursively search a tree using DFS?