Meta interview question

Flatten binary tree to doubly linked list