Waste less time on Facebook — follow Brilliant.
Back to all chapters

Binary Search Trees

Storing data in a way that allows efficient access and changes is critical in Computer Science. Binary Search Trees are a fundamental tree-like structure that you'll want in your toolkit!

Concept Quizzes

Challenge Quizzes

Binary Search Trees


Suppose the keys 55,63,31,17,22,40 are inserted into a binary tree in that order. Which of the following is the BST that is formed?





Given a binary search tree, we want to write a search method. This method will look for a node with a specific key and return that node. Below is an incomplete implementation

The two redboxes indicate missing code. What lines should replace box 1 and box 2 respectively?

Which of the insertion sequences cannot produce the binary search tree below?




Problem Loading...

Note Loading...

Set Loading...