Seminar date: February 18
“Big O” aka Complexity Analysis: O(1), O(N), O(N^2), O(log N), O(n log N)
- O(1): code that executes in the same amount of time no matter how big the array is
- O(N): linear search, perfect to find all values that match what you are searching for. You will have to look at each item in the array.
- O(N^2): Time to complete will be proportional to the square of the amount of data (nested iterations).
- O(log N): MUCH MORE EFFICIENT. Data is searched 50% each time the algorithm runs. (Binary Search)
- O(n log N): To figure out the number of comparisons needed, comparing and moving values without shifting values, compared only once.