codevolution youtube channel - Data Structures and Algorithms practice
https://www.youtube.com/playlist?list=PLC3y8-rFHvwjPxNAKvZpdnsr41E0fCMMP
- Independent of input size; instant result, just some if conditions or direct computation or lookup; no loops -> O(1) - very fast and good
- Loop -> O(n) - 1:1 as the input size
- One nested loop -> O(n^2) - n squared
- Two nested loops -> O(n^3) - n cubed and so on.
- Length of loop / input size is reducing by half -> O(log n)
O(n!) - horrible O(2^n) - exponential - horrible O(n^2) - horrible O(n log n) - bad O(n) - fair O(log n) - good O(1) - excellent