Analysis of Algorithms
Analysis of an algorithm gives insight into how long the program runs and how much memory it uses
- time complexity
- space complexity
Analysis can provide insight into alternative algorithms
Input size is indicated by a number n (sometimes there are multiple inputs)
Running time is a function of n such as
T(n) = 4n + 5
T(n) = 0.5 n log n - 2n + 7
T(n) = 2n + n3 + 3n