1 Preparing for Exam 1
1.1 HW2 grades completed
1.2 Start with question
1.3 Fundamental Concepts
1.4 Alternate Question
1.5 Version : 2014/ 02/ 11

CS 2223 Nov 17 2015

Lecture Path: 13
Back Next

Expected reading:
Daily Exercise:

There are no secrets to success. It is the result of preparation, hard work learning from failure.

General Colin Powell

1 Preparing for Exam 1

1.1 HW2 grades completed

Grades are now complete for HW2. You can retrieve feedback later today: Not all of the excel documents have been uploaded by the graders.

Statistics show the average was 70 (median: 78), compared to average of 86 (median: 91) on HW1. Discussion ensues.

1.2 Start with question

An array of N integers is defined to have a dominant value if that value is duplicated more than N/2 times in the array. Thus [1, 2, 3, 4, 5, 6] has no dominant value, but 2 is the dominant value for the array [1, 2, 1, 2, 2]. Note that this definition holds when N is either even or odd.

Design algorithm to solve this problem

Then determine its running time by computing a Tilde approximation based on the size of the array, N.

Note: This problem requires more time to think about than granted on an exam. But it makes for a nice discussion point.

1.3 Fundamental Concepts

Brief review of the first half of this course, and fundamentals we have been practicing.

1.4 Alternate Question

A researcher proposes to design a data type which consiststs of a linear linked list of nodes, each of which stores an array of K individual comparable items in sorted order. This data type will offer the following operations:

He claims he needs ~ log(N*K) performance for determining whether the collection contains a given element.

Discussion ensues.

1.5 Version : 2014/02/11

(c) 2015, George Heineman