CpE_360_HW_4

# CpE_360_HW_4 - 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

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

Homework 4 CpE 360 – Computational Algorithms and Data Structures Instructor: Ashish Patel Due on December 12, 2006 All solutions must be (i) either delivered at the beginning of the class on December 12, 2006 (ii) or submitted per email at [email protected] by 12:30 pm December 12, 2006. No late submission will be taken into consideration! Any homework submitted per email must contain full student’s name and description which homework has been submitted. The work you turn in must be your own personal work, composed and written by you. If you discuss a problem with a fellow student, you must mention this clearly in your homework (name and the fellow student before the solution of the problem). Your work will then be compared to the other student’s work to verify that your solution was written by you and reflect your own personal effort. If you don’t report it, it will be considered a violation of the course rule. Note: Solutions must be concise, complete and must include pledge of the Honor system.
This is the end of the preview. Sign up to access the rest of the document.

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 pre-order, post-order and in-order 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 Max-Heap structure. Show your steps for every element you insert in the given order. Hint: (Similar example was given in the class for Min-Heap structure.) b) Once, you build a Max-Heap 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.

Ask a homework question - tutors are online