Pergunta de entrevista da empresa Microsoft

Traverse binary tree to find leaf nodes in a particular order