menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Performanc...
source image

Prodevelopertutorial

3w

read

145

img
dot

Performance analysis of an algorithm: Time Complexity

  • 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).

Read Full Article

like

8 Likes

For uninterrupted reading, download the app