flatten BT to linked list leetcode