Assume that inorder traversal of following tree is given 40 / \ 10 30 / \ 5 28
inorder = [ 5 , 10 , 40 , 30 , 28 ] NEW_LINE Len = len ( inorder ) NEW_LINE root = buildTree ( inorder , 0 , Len - 1 ) NEW_LINE