This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 1) Suppose that we have numbers between 1 and 1000 in a binary search tree and want to search for the number 363. Which of the following sequences could not be the sequence of the nodes examined? a) 2, 252, 401, 398, 330, 344, 397, 363. b) 924, 220, 911, 244, 898, 258, 362, 363. c) 925, 202, 911, 240, 912, 245, 363. d) 2, 399, 387, 219, 266, 382, 381, 278, 363. e) 935, 278, 347, 621, 299, 392, 358, 363. 2) Draw a binary tree from the following array representation. What is the preorder, postorder and inorder traversal for the binary tree? A B C D E F G H I 3) 13, 16, 19, 14, 23, 17, 6 a) Insert the given sequence for MaxHeap structure. Show your steps for every element you insert in the given order. Hint: (Similar example was given in the class for MinHeap structure.) b) Once, you build a MaxHeap structure from the given list, perform one Deletemax() operation on the heap structure. Show your steps....
View
Full
Document
This note was uploaded on 05/25/2010 for the course CPE CPE 360 taught by Professor Jenniferchen during the Spring '10 term at Stevens.
 Spring '10
 JenniferChen

Click to edit the document details