Computer Science 170 - Spring 2000 - Clancy - Midterm 1

Computer Science 170 - Spring 2000 - Clancy - Midterm 1 -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
<!--CS 170, Midterm #1, Spring 2000 --> CS 170, Spring 2000 Midterm #1 Professor M. Clancy This is an open-book test. You have approximately eighty minutes to complete it. You may consult any books, notes or other paper-based inanimate objects available to you. To avoid confusion, read the problems carefully. If you find it hard to understand a problem, ask us to explain it. If you have a question during the test, please come to the front or the side of the room to ask it. This exam comprises 15% of the points on which your final grade will be based. Partial credit may be given for wrong answers. Your exam should contain six problems (numbered 0 through 5) on eight pages, with two more blank pages at the back of the exam. Please write your answers in the spaces provided in the test; in particular, we will not grade anything on the back of an exam page unless we are clearly told on the front of the page to look there. Relax -- this exam is not worth having a heart failure about. Problem #0 - 1 point, 1 minute Put your name on each page. Also make sure you have provided the information requested on the first page. Problem #1 - 4 points, 10 minutes Suppose that the following statements initialize the union/find structure descibed in CLR section 22.3. for (k=0; k<6; k++) { MakeSet(k); } On the next page show the data structures, including ranks of representative elements, that result for each of the following statements. Assume that the statements are executed in sequence. Also assume, as in CLR,
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 / 6

Computer Science 170 - Spring 2000 - Clancy - Midterm 1 -...

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