• retagged by
765 views
0 0 votes
I wanted to know how θ is derived for a problem. Can we write it directly Example

n^4 + n^3+ n^2

Here worst case will be n^4 since it is the term with highest power(worst).

Similarly can i get θ

Please log in or register to answer this question.

Position:
Show:

Related questions

0 0 votes
1 1 answer
698
698 views
GO Classes asked Sep 16, 2024
698 views
What is the time complexity of code given?def fun(n): count = 0 i = n while i>0 : for j in range(i): count += 1 i //= 2 return count$\Theta(\log n)$$\Theta(n)$$\Theta(n \...
1 1 vote
2 2 answers
471
471 views
GO Classes asked Sep 16, 2024
471 views
Consider $\text{Iterated logarithm}$ of $n,$ written $\log^\ast n$ (usually read "$\log$ star $n$"), is the number of times the logarithm (base $2$) function must be iter...
5 5 votes
1 1 answer
495
495 views
GO Classes asked Sep 16, 2024
495 views
Consider the following $\text{C}$ function:def fun1(n): q = 0 for i in range(1, n): p = 0 j = n while j 1: p += 1 j = j // 2 k = 1 while k < p: q += 1 k = k * 2 return q...