Big O Notation
We can use the Big O notation to describe Runtime Complexity (time) and Space Complexity (memory).
O(n^2)
It is a result of nested loops.
O(log n)
It has good scalability. The remaining work items are reduced by half with every iteration. An example of it is binary search.