Pergunta de entrevista da empresa Microsoft

Link the leaf nodes of a binary tree into a linked list