Back to course home
0% completed
Vote For New Content
Table of Contents
What is Big-O?
What is time complexity?
What is space complexity?
Examples of time complexity
Example algorithms and their time complexities
- Linear search - O(n)
- Binary search - O(log n)
- Bubble sort - O(n^2)
- Quick Sort - O(nlog n) on average, O(n^2) worst case
- Fibonacci sequence - O(2^n)
Example algorithms and their space complexities
- Linear search - O(1)
- Fibonacci sequence - O(n)
- Merge sort - O(n)
- Quick Sort - O(log n) or O(n)
- Create Matrix - O(n²)