giving right ans in eclipse but showing wrong here
@vikashkmr519, Your preorder traversal is wrong. You need to make bst without sorting the array