Given a binary tree where each node has a key value, rearrange the tree structure to achieve the minimum lexicographic sequence when traversing inorder.
Transform the tree and return the inorder traversal sequence.
worldtree.sml- SML/NJ implementationarrange.c- C implementationJava/- Java implementation with TreeNode and Arrange classes