Section 3.3: #1, 2, 3, 4, 5, 26, 30, 32…with the following modifications:
- Hand in solutions for questions 1-5 (including the odd ones). Those questions ask for big-
estimates; instead give big-
estimates for each. (This sounds like it’d be harder than giving a big-
estimate, but I think you’ll find it’s easier to think about big-
.) Notice that questions 3 and 4 are asking you to ignore comparisons in the for and while loops…for your HW you can either ignore them or include them, just be clear about what you’re doing.
- For questions 26, 30, and 32, you’ll have to go back to your solutions from HW#1 and the practice problems from section 3.1. Include those algorithms in pseudocode on your HW#4 paper. (If you didn’t write down those algorithms correctly, here’s your chance to try again.)
Please staple your pages and write “HW#4” and your name at the top of the first page.
FYI, on Monday we’ll analyze the complexity of the binary search algorithm.