Pergunta de entrevista da empresa Amazon

Convert binary tree into list, but using constant memory