Exam3_Review_Soln - COP 3502 - Exam 3 Review Thursday April...

Info iconThis preview shows pages 1–2. 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 Pass 1: [21, 37 | 28, 6, 2, 23, 35, 17, 44, 4, 11, 33, 18] Pass 2: [21, 28, 37 | 6, 2, 23, 35, 17, 44, 4, 11, 33, 18] Pass 3: [6, 21, 28, 37 | 2, 23, 35, 17, 44, 4, 11, 33, 18] b) Bubble Sort Pass 1: [21, 28, 6, 2, 23, 35, 17, 37, 4, 11, 33, 18, | 44] Pass 2: [21, 6, 2, 23, 28, 17, 35, 4, 11, 33, 18, | 37, 44] Pass 3: [6, 2, 21, 23, 17, 28, 4, 11, 33, 18, | 35, 37, 44] c) Selection Sort Pass 1: [2, 21, 28, 6, 37, 23, 35, 17, 44, 4, 11, 33, 18] Pass 2: [2, 4, 28, 6, 37, 23, 35, 17, 44, 21, 11, 33, 18] Pass 3: [2, 4, 6, 28, 37, 23, 35, 17, 44, 21, 11, 33, 18] 2. Insert the following values into a hash table of size 10 using the hash equation
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Exam3_Review_Soln - COP 3502 - Exam 3 Review Thursday April...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online