This preview shows page 1. Sign up to view the full content.
Unformatted text preview: o Squareroot is a monotonic function so you can remove it to save time What do you want in an algorithm? o Correctness is good o Correctness should be provable o It should be fast (machine independent) o Problem size dependent Worst case complexity for given input size Statement counting 1. Figure out loop bounds in terms of the next highest level loop variable # of itnerations = high-low+1 2. Assign loop body # of interations computed in...
View Full Document
- Spring '11
- Computer Science