Lecture Notes on 18 Sep 2020 * What is an algorithm? - step by step solution to a problem * What are the characteristics of an algorithm? - finite, the algorithm must terminate - definite, each of the steps are well defined - computable, each of the steps can be computed * How do you judge the efficiency of an algorithm? - time complexity - space complexity * A problem has many instances. We use the worst-case scenario to judge the performance. * Linear algorithm, O(n) - time complexity increases linearly as the size of the instance