Amazon interview question

Convert binary tree into list, but using constant memory