Use the index of element found in postorder to divide postorder array in two parts . Left subtree and right subtree
if ( i <= h ) : NEW_LINE INDENT root . left = constructTreeUtil ( pre , post , l , i , size ) NEW_LINE root . right = constructTreeUtil ( pre , post , i + 1 , h , size ) NEW_LINE DEDENT return root NEW_LINE