Wipro interview question

Sorting of a binary search tree