Driver code
int main ( ) { struct 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 ) ; printf ( " Inorder ▁ Traversal ▁ of ▁ the " ) ; printf ( " original ▁ tree ▁ STRNEWLINE " ) ; printInorder ( root ) ; correctBST ( root ) ; printf ( " Inorder Traversal of the " printf ( " fixed ▁ tree ▁ STRNEWLINE " ) ; printInorder ( root ) ; return 0 ; }