Pregunta de entrevista de Microsoft

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