Exercise: Checking the BST property
Challenge yourself with an exercise in which you'll have to check the BST property for a Binary Search Tree!
We'll cover the following
Problem #
You are required to check and determine whether a tree satisfies the BST property. First of all, let’s define the BST property.
BST Property #
The BST property states that every node on the right subtree has to be larger than the current node, and every node on the left subtree has to be smaller than the current node.
The binary search tree property (BST property) is a global property that every binary search tree must satisfy.
Below are some examples that show which trees satisfy the BST property:
Get hands-on with 1400+ tech skills courses.