Driver Code
public static void Main ( String [ ] args ) { GFG tree = new GFG ( ) ; int [ ] iN = new int [ ] { 9 , 8 , 4 , 2 , 10 , 5 , 10 , 1 , 6 , 3 , 13 , 12 , 7 } ; int [ ] pre = new int [ ] { 1 , 2 , 4 , 8 , 9 , 5 , 10 , 10 , 3 , 6 , 7 , 12 , 13 } ; int len = iN . Length ; TreeNode root = tree . buildTree ( pre , iN ) ; tree . printInorder ( root ) ; } }