COMP 250 Lecture Notes - Lecture 16: Pseudocode
Document Summary
October 17 big o, big omega, big theta. We are trying to understand how long it takes for an algorithm to run. There are so many things happening when you write out pseudocode. We want to concentrate on some things and ignore other things. We are generally interested in how the time it takes goes with the size of the input (the number of digits in a number we"re looking at, the number of elements in a list, etc). We don"t want to pay attention to random constants. Not sure how long it takes to do each thing, but we know it depends on n (the stuff on the loop), whereas the stuff in the beginning and end happen only once. The stuff inside the loop takes a constant amount of time, and the stuff outside the loop takes a constant amount of time.