Summary &amp; Review Questions Chapter 10

# Summary& Review Questions Chapter 10

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ce 5 3 18 13 9 14 21 24. Construct the tree. 6) * Given a pointer to a node N in a binary search tree and a key x, you are to write a procedure that finds outputs the node in the subtree rooted at N that contains the smallest key larger than x. If such a node does not exist, it should a NULL pointer. Example: Consider the binary search tree shown below. If n is the node containing 7, and x is 4 (or 4.7), the output should be the node containing 5. If x = 8, NULL pointer should be returned. 7) The following recursive procedure takes as input a binary tree node T, and answers true (false) if T represents (does not represent) a binary search tree. D...
View Full Document

## This note was uploaded on 02/08/2014 for the course CS 315 taught by Professor Kooshesh,a during the Fall '08 term at Sonoma.

Ask a homework question - tutors are online