Unformatted text preview: 6. Section 3.4 Problem 24 on page 209 (12 points) 7. Section 3.5 Problem 18 on page 218 (15 points) Extra Credit Questions: 1. You are given S, an infinite nondecreasing sequence of positive integers in which each integer is repeated finitely many times, and an integer x. Design an algorithm which returns the location of x if it is in S, and 1 otherwise. Explain your algorithm in plain English first, then present it in pseudocode and analyze its running time. The number of points you receive will be determined by the efficiency of your algorithm (8 points) 2. Section 3.5 Problem 32 on page 218 (7 points)...
View
Full Document
 Spring '08
 Staff
 Natural number

Click to edit the document details