English

With the help of an example, briefly explain the dominant term in complexity. - Computer Science (Theory)

Advertisements
Advertisements

Question

With the help of an example, briefly explain the dominant term in complexity.

Answer in Brief

Solution

  • When determining the performance of an algorithm, we must also consider the term, which is an important component that influences the function's performance. Such a phrase is referred to as dominant.
  • For example, let an algorithm have both a nested loop running it N2 times and a single loop running N times. In this case, N2 is the dominant term and hence, the complexity is O(N2).
shaalaa.com
Importance of Dominant Term
  Is there an error in this question or solution?
2023-2024 (February) Official
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×