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