Hi sir,
I’m a little bit confused about the Quiz 1. Why the time complexity is O(N)?
I think when i = N then the innermost loop will take N times to execute. The outermost could take logN times because it reduces a helf after each step.
Thanks for your help.