In this chapter, we learn about calculating time complexity.Example 1: Time complexity of calculating sum of 'n' numbers in an array is O(n).Example 2: Time complexity of matrix addition is O(n^2).Different types of time functions include O(1), O(n log n), O(n), O(n^2), O(n^3), O(2^n), O(3^n), O(n^n).The increasing order of time consumption is O(1) < O(n log n) < O(n) < O(n^2) < O(n^3) < O(2^n) < O(3^n) < O(n^n).