Conclusion
Algorithm complexity is used to measure the performance of an algorithm in terms of time taken and the space consumed.
Big(O) notation
is one of the most commonly used metrics for measuring algorithm complexity. In this article you saw how to find different types of time and space complexities of algorithms using Big(O) notation. You'll now be better equipped to make trade-off decisions based on complexity in the future.