What is the rankings for the big O notation for time complexity ? (with the highest rank being the fastest)
O(1) - Constant
O(log n) - Logarithmic
O(n) - Linear
O(n log n) - Linearithmic
O( n^2) - Polynomial
O(2^n) - Exponential
State the purpose of Big O notation
Explain what is meant by Time Complexity
How the times scales as data size increases
Explain what is meant by Space Complexity
How much memory the algorithm needs as the data size increases
Explain O(1)
Always executes in the same amount of time regardless of the size of the data set
Explain O(log n)
Halves the data set in each pass
Explain O(n)
As the number of items in data set increase, the time it takes to complete the action increases by same amount
Explain O(n^2)
Performance is proportional to the square of the size of dataset. Reduces efficiency with larger datasets.
Explain O(2^n)
Doubles the dataset when an item is added to the dataset
What are the best, average, worst case time complexities for linear search
What are the best, average, worst case time complexities for binary search
What are the best, average, worst case time complexities for binary search tree
What are the best, average, worst case time complexities for hashing
What are the best, average, worst case time complexities for bubble sort
What are the best, average, worst case time complexities for insertion sort
What are the best, average, worst case time complexities for merge sort
What are the best, average, worst case time complexities for quick sort
What are the space complexities for the SORTING ALGORITHMS