Big O (Time Complexity)

Big O NotationNameExample
O(1) ConstantChoosing one item by index from an array, no matter how long the array it will be the same.
O(log n)LogarithmicBinary search, because every time a comparison is made it is more likely that the search is complete. The search area is halved each time.
O(n)LinearSumming all elements in an array, because each element needs to be checked once so it will increase linearly with the size of the array (n).
O(n log n)Linearithmic
O(n^2)Quadratic
O(n^3)Cubic
O(2^n)Exponential
O(n!)Factorial

Discussion

Reference

https://www.happycoders.eu/algorithms/big-o-notation-time-complexity/

https://adrianmejia.com/most-popular-algorithms-time-complexity-every-programmer-should-know-free-online-tutorial-course/