Exam3_Review

Exam3_Review - order: 1,2,5,6, 8. 1 2 3 4 5 6 7 8 9 3. Run...

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

View Full Document Right Arrow Icon
COP 3502 - Exam 3 Review Thursday April 2, 2009 1. From a past foundation exam: Given the array [37, 21, 28, 6, 2, 23, 35, 17, 44, 4, 11, 33, 18] show the state of the array after each pass when the following sorting algorithms ((a) Insertion Sort, (b) Bubble Sort, and (c) Selection Sort) are applied on the original array for three (3) passes. a) Insertion Sort b) Bubble Sort c) Selection Sort 2. Insert the following values into a hash table of size 10 using the hash equation (x 2 +1) % 10 using the quadratic probing technique. Insert these values in sequential
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: order: 1,2,5,6, 8. 1 2 3 4 5 6 7 8 9 3. Run QuickSelect to find the 3 rd smallest number in the following list: 6 2 8 9 4 1 10 How many times does partition get called? 4. What is the run time of Merge Sort? 5. What is the Best case run time of Quick Select? 6. What is the worst case run time for Quick Select? 7. Run heapify on the following list of numbers: 6, 2, 1, 5, 7, 3, 8, 4 8. Perform remove min on the previously constructed tree from #7. 9. Perform insert 1 into the resulting heap after #8....
View Full Document

Ask a homework question - tutors are online