Driver code
public static void main ( String [ ] args ) { node root = new node ( 6 ) ; root . left = new node ( 10 ) ; root . right = new node ( 2 ) ; root . left . left = new node ( 1 ) ; root . left . right = new node ( 3 ) ; root . right . right = new node ( 12 ) ; root . right . left = new node ( 7 ) ; System . out . printf ( " Inorder ▁ Traversal ▁ of ▁ the " ) ; System . out . printf ( "original tree NEW_LINE"); printInorder ( root ) ; correctBST ( root ) ; System . out . printf ( " Inorder Traversal of the "); System . out . printf ( "fixed tree NEW_LINE"); printInorder ( root ) ; } }