Oracle interview question

code for converting binary search tree into doubly linked list.