We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
How is the tree created from the sample input? In this case we are given the following as the sample input:
2
1 2 3 4 5 6 7
Can someone help me visualize the corresponding binary tree! As far as I know, a binary tree can be reconstructed using the inorder and postorder or preorder traversals.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Is This a Binary Search Tree?
You are viewing a single comment's thread. Return to all comments →
How is the tree created from the sample input? In this case we are given the following as the sample input: 2 1 2 3 4 5 6 7
Can someone help me visualize the corresponding binary tree! As far as I know, a binary tree can be reconstructed using the inorder and postorder or preorder traversals.