{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 5 - CSCE 350 Data Structures and Algorithms Homework 5...

This preview shows pages 1–7. Sign up to view the full content.

CSCE 350: Data Structures and Algorithms Spring 2010 Homework 5 Solution 04/07/10 1. (0.6 points) Problem 6.1.2. 2. (0.6 points) Problem 6.3.4 (a), (c). Make sure you write out each intermediate step.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
3. (0.6 points) Construct a 2-3 tree for the list 1, 9, 3, 7, 5, 2, 6, 8, 4.
4. (0.6 points) Problem 6.4.1. 5. (0.6 points) Problem 6.4.5 (a). ( Hint : In which part of a heap will the smallest key be found?)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6. (0.6 points) Sort the following list by heapsort by using the array representation of heaps: 3, 2, 7, 6, 9, 4. Please remember to write out the steps in both of the two stages. Stage 1 (heap construction) Stage 2 (maximum deletions) 3 2 7 6 9 4 9 6 7 3 2 4 3 2 7 6 9 4 4 6 7 3 2 | 9 3 9 7 6 2 4 7 6 4 3 2 9 3 7 6 2 4 2 6 4 3 | 7 9 6 7 3 2 4 6 2 4 3 6 3 4 2 2 3 4 | 6 4 3 2 2 3 | 4 3 2 2 | 3 2 7. (0.6 points) Problem 7.2.2.
8. (0.6 points) Problem 7.2.3.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
9. (0.6 points) Do Problem 7.3.1 using the input 42, 35, 14, 20, 90, 64 and hash function h ( K ) = K mod 11. a. The hash addresses are as follows: K 42 35 14 20 90 64 h ( K ) 9 2 3 9 2 9 The open hash table should be: 0 1 2 3 4 5 6 7 8 9 10 35 90 14 42 20 64 b. The largest number of key comparisons in a successful search in this table is 3 (in
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 8

5 - CSCE 350 Data Structures and Algorithms Homework 5...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online