SparkNotes Shopping Cart  |     |  Checkout
Brought to you by Barnes and Noble
  Home : Math & Science : Computer Science Study Guides : Trees : Binary : Problems 1
Binary Search in Trees
  
 
Problems 1
Problem 1.1: Write a function that will perform a binary search on a sorted array of integers. [Solution]
Problem 1.2: Assume now that we modify the definition of a binary search tree slightly. All of the data in a left subtree must precede the data in the current node, but all of the data in the right subtree must only be greater than or equal to the data in the root node (as opposed to exclusively greater than). Write a function that will take a new binary search tree and return 1 or 0 for whether it contains any duplicates. [Solution]
Problem 1.3: What is the worst case scenario for a binary search tree in terms of the complexity for searching for a data element? What about for adding a new data element? [Solution]
Help | Feedback | Make a request | Report an error | Send to a friend
 
We'll help you raise your score on the SAT II Physics test!
More...
 
For students sick of scribbling geometry concepts on index cards, SparkNotes Study Cards are the answer.
More...
 
 
Go to top