solve question: flatten binary tree to linked list