Binary Search in Trees


Problems 2

Problem : We provided a rather simple function for adding a new element to a binary search tree. We neglected, however, to show how to remove an element. Write a function that will remove an element from a binary search tree.


Problem : You are given a set of phone numbers and the names of people to whom they belong. You are to create a binary search tree to quickly look up people based on their phone numbers. What sort of data will you put into the nodes and by what piece of the data will the tree be ordered?


Problem : Assuming the data is given to you in random order, how might you create the binary search tree and what is the complexity of this operation?


Take a Study Break

Green YOUR SCHOOL!

Click here to get involved with dosomething.org!

John Krasinski's BIG MIRACLE

Click to watch the trailer and read exclusive star interviews!

Do you like Anna?

Read Dear Albert... from ANNA's perspective!

BATTLESHIP, the movie

Here's why we're super jazzed about it.

Do energy juices actually work?

Our blogger puts 'em to the test!


The Book

Cover image

Read What You Love, Anywhere You Like

Get Our FREE NOOK Reading Apps