Do inorder traversal of the binary tree and store the result.
sort the result in acending order
form the binary search tree by taking middle element of the sorted list as root( this can done using binary search). so we get balanced binary search tree.