How to convert a binary tree to binary search tree in-place, i.e., we cannot use any extra space.
Convert Binary Tree to a doubly linked list- can be done inplace in O(n)
Then sort it using merge sort, nlogn
Convert the list back to a tree - O(n)
Simple nlogn solution.