Duplicate elements should be kept in the right subtree.
The first line of input contains data of the nodes of the tree in level order form. The data of the nodes of the tree is separated by space. If any node does not have a left or right child, take -1 in its place. Since -1 is used as an indication whether the left or right nodes exist, therefore, it will not be a part of the data of any node.
The first and only line of output contains either true or false.
0 <= Number of edges <= 10^5
Time Limit: 1 second
Preorder Traversal
Preorder Traversal
Inorder Traversal
Inorder Traversal
Inorder Traversal
Inorder Traversal
Inorder Traversal
Postorder Traversal
Postorder Traversal
Height of Binary Tree
Height of Binary Tree
Height of Binary Tree
Height of Binary Tree
Locked Binary Tree