engineering recuitment NIC NIELIT Scientist B 2023 Mock Test Algorithms Asymptotic Worst Case Time and Time Complexity Introduction
What is the complexity of the following code?
sum=0;
for (i=1; I <= n; i*=2)
for(j=1; j<=n;j++)
sum++;1
O(n2)
2
O(n log n)
3
O(n)
4
O(n log n log n)