Can anyone tell me answer for this algorithm?
I Think the answer is O(nlogn) but i’m not confident with my answer
Can anyone tell me answer for this algorithm?
I Think the answer is O(nlogn) but i’m not confident with my answer
it will be n^2. as the loop give complexity of n. and loop are nested so its n*n=n^2.