Time ComplexityLesson 44Free preview
Introduction
This lesson is part of DSA · All levels
Summary
Time complexity analysis measures how fast the algorithm's execution time grows with n input sizes, without being dependent on a particular machine. The Big O notation states the upper limit, Omega states the lower limit, and Theta states the strict limit. The most commonly used are O(1), O(log n), O(n), O(n log n), and O(n^2).
Key points
- Big O states the limit on the growth of execution time to input
- Common notation: O(1), O(log n), O(n), O(n log n), O(n^2), O(2^n)
- Space complexity is also analyzed.
- The constants and lower triangle factors are ignored in the Big O
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.