CSCA48H3 Lecture Notes - Lecture 15: Pseudocode
Document Summary
Solving a problem step-by-step in a finite amount of time. We are not interested in this for now. Implement the algorithm using one of the programming languages. Results are only indicative of the running time on data included in the experiment. The same hardware and software in similar execution atmosphere must be used to compare two algorithms. Uses a pseudo-code instead of a code to describe the algorithm. Allows us to compute the running time of the algorithm independent of the environment and language. Takes into account the worst case scenario for inputs. Describe the execution time as a function of input size. Assumes that every primitive operation takes one unit of time in a certain machine model. Expression evaluation, assignment, indexing into an array, function call, returning from a function, comparison, follow an object reference. Is the time taken to run an algorithm when maximum amount of resources is required (worst case complexity)