Answer to Question #186676 in Functional Analysis for Geetika

Question #186676

Calculate Time Complexity of following

(i)


Fπ‘œπ‘Ÿ (𝑖 = 1;𝑖 ≀ 𝑛; 𝑖 βˆ— = 2)

{Β 

π‘₯ = π‘₯ + 1Β 

}


(ii)


π‘“π‘œπ‘Ÿ (𝑖 = 1;𝑖 ≀ 𝑛; 𝑖 + +)

π‘“π‘œπ‘Ÿ (𝑗 = 1;𝑗 ≀ 𝑛;𝑗 = 𝑗 βˆ— 2)

{Β 

… .Β 

… .Β 

}


1
Expert's answer
2021-05-07T11:10:01-0400

(i)

Logarithmic time – O (log n)

The algorithm reduces the size of the input data in each step.


(ii)

Logarithmic time – O (log n)


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS