Pregunta de entrevista de Workday

Code how to do a pre-order traversal in Java