it is written in the pdf to attempt assignment 3 and 4 ques where is that assignment and what is the ans of ex4
About the pdf provided on complexity
hi @aslesha.j7, i will update you with the status on assignment 3 and 4 ,
the ans for ex4 is o(n)
we have,
for (i = n; i > 0; i /= 2){
for (j = 0; j < i; j++){
constant number of operations.
}
}
since j iterates over i
and i takes values as n , n/2, n/4,n/8…
thus number of operations performed = n + n/2 +n/4 + n/8 +n/16 … which forms a GP
and evaluates to 2*n
thus the time complexity is O(n)
if there are assignment 3 and 4 there must be more too plz update me with them also
@aslesha.j7, the assignments were for classroom course student previously and is now included in the form of quizzes. we will update the correction shortly