@9.21 doubt in optimized algorithm

sir it is said that time complexity in optimized algorithm is
O(root(n))

but but i think it would O(root(n)*log(n))
in worst case isnt it??

@tejasddongare no it’s O(sqrt(n)) only!
actually average complexity is O(logn) but worst case is O(sqrt(n))!

this is because when you find a divisor , you also divide n by it, hence n reduces and so the iterations!