Pergunta de entrevista da empresa Thermo Fisher Scientific

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