Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What property differentiates the left and right children of a node in a binary search tree?
Think about how values are organized in a BST.
In a BST, if the root is 10, and there is a left child of 5, what value could the right child hold?
It's about the relationship between parent and child nodes.
What is the time complexity of searching for an element in a balanced binary search tree?
Consider how many comparisons you might need at each level.
True or False: A binary search tree can contain duplicate values.
Think about the fundamental definition of a BST.
Construct a binary search tree from the following list of values: 20, 10, 30, 5, 15, 25, 35. Then, perform an in-order traversal.
Keep the BST properties in mind while inserting values and remember the traversal order.
Provide an algorithm to delete a node with a specified value from the binary search tree and explain the steps involved.
Think about how the tree structure changes after a deletion.
6 more questions in this section. Enroll free to practise them all.
Enroll free