Pergunta de entrevista da empresa Salesforce

Q: Implement the preorder, inorder and postorder traversals without using stack or recursion