Computer Science, asked by muhammadhaider6744, 8 months ago

Applying the formula (n-1)*(n-2) in terms of big oh notation gives

Answers

Answered by gauravarduino
0

Explanation:

1.1 Time complexity and Big-Oh notation: exercises . 1. A sorting method with “Big-Oh” complexity O(n log n) spends exactly 1 ... 2. A quadratic algorithm with processing time T(n) = cn2 spends T(N).

Answered by RitaNarine
0

Applying the formula (n-1)*(n-2) in terms of big oh notation gives Ω (n²) or θ (n²).

  • It may also be viewed as a way of representing algorithm complexity using the big oh notation.
  • However, both values are big oh notations, so they would need to be defined.
  • Therefore, the formula can be used to describe how fast an algorithm runs based on the input size.
  • But Big O notation is helpful for many things, like looking at the time complexity of algorithms.
  • Another relevant example is sorting algorithms, where one can describe how many elements must be sorted to complete the sorting algorithm
  • And another example would be the knapsack problem, where you can describe how many items can be carried in a limited amount of space
  • Now it's just a matter of picking the right function to use to talk about the time complexity of the algorithm.
  • That makes sense. Like we could use big O notation to describe the complexity of algorithms using recursion.
  • Unlike other algorithms, recursion allows us to analyze algorithms that repeatedly call themselves.
  • The same function can also be applied repeatedly to an algorithm to analyze its complexity using recursion.

and hence,

Applying the formula (n-1)*(n-2) in terms of big oh notation gives Ω (n²) or θ (n²).

#SPJ1

Learn more about this topic

https://brainly.in/question/1300995

https://brainly.in/question/53813072

Similar questions