flatten binary tree to linked list {moderate}