CSC148H5 Lecture Notes - Lecture 27: Anagram, Big O Notation, University Of Toronto Mississauga
Document Summary
Csc148h5s - introduction to computer science (winter 2017) Lecture 27: algorithm efficiency (lecture 26 was a test date) Measuri(cid:374)g elapsed ru(cid:374)ti(cid:373)e is o(cid:374)e (cid:449)ay to get a se(cid:374)se of a(cid:374) algorith(cid:373)"s effi(cid:272)ie(cid:374)(cid:272)y. However, runtime depends on the computer on which the program is run, the programming language being used, and lots of other factors. Instead, we will characterize time efficiency in a way that. A step is a basic unit of computation that can be carried out in a fixed amount of time. We want to determine the number of steps that an algorithm takes as a function of its input size. How we define input size depends a lot on the problem. E. g. for the anagram problem, the input size involves word length and number of words in the dictionary. Typically the input size is the number of elements in the input.