Simplified analysis of an algorithm's efficiency.
O(1) < O(log n) < O(n) < O(n log n) < O(nˆ2) < O(2ˆn) < O(n!)
<aside> 💡 In an If statement, we're going to always considerate the worst-case path.
</aside>
There are 3 common cases: linear time, constant time and quadratic time. They behavior like their respective functions, when we plot a chart with some examples. Like below:
x = 5 + (15 * 20);