Created 01/07/03

# on Recursion

This is a practice quiz. The results are not recorded anywhere and do not affect your grade. The questions on this quiz might not appear in any quiz or test that does count toward your grade.

Instructions: For each question, choose the single best answer. Make your choice by clicking on its button. You can change your answers at any time. When the quiz is graded, the correct answers will appear in the box after each question.

1. What are two parts to recursion?

 A.    (1) If the problem is easy, solve it immediately, and (2) If the problem can't be solved immediately, divide it into smaller problems. B.    (1) Divide the problem into smaller problems, and (2) give immediate solutions for the hard problems. C.    (1) Discard the hard cases , and (2) solve the easy easy cases. D.    (1) Solve the problem by asking it to solve itself, (2) Solve the easy cases in one step.

2. How can you drink an entire keg of root beer?

 A.    (1) take one swallow, then (2) take another swallow. B.    (1) If the keg is empty do nothing, otherwise (2) take one swallow, then drink the rest of the keg. C.    (1) take one enormous gulp, and (2) wish you hadn't. D.    (1) drink one keg, and (2) drink another keg.

3. How do you study a text book?

 A.    (1) Read the book on day 1, and (2) read it again each day of the semester. B.    (1) If you have reached the end of the book you are done, else (2) study one page, then study the rest of the book. C.    (1) Divide the book in two, and (2) study each half. D.    (1) Cram all the pages in one horrible session, and (2) forget everything the next night.

4. How does Sherlock Holmes solve a mystery?

 A.    (1) Examine one clue, and (2) examine the remaining clues. B.    (1) Question one witness, and (2) question the victim. C.    (1) Eliminate one witness, and (2) eliminate the remaining witnesses. D.    (1) When one suspect remains, that is who did it. (2) Examine the evidence to eliminate one suspect, then eliminate the remaining suspects.

5. How does a Web crawler visit every Web page at a Web site?