Binary Search Trees
A binary search tree (BST), a special form of a binary tree, satisfies the binary search property:
The value in each node must be greater than (or equal to) any values stored in its left subtree.
The value in each node must be less than (or equal to) any values stored in its right subtree.
Important Properties of BST
InOrder traversal is not an unique identifier for BST
PreOrder and PostOrder are unique identifiers of BST
inOrder = sorted(preOrder) + sorted(postOrder)
InOrder + PreOrder and InOrder + PostOrder are unique identifiers of BST and be used to reconstruct the BST
Last updated
Was this helpful?