What is the time complexity?
for(i = 1 to n)
while(j ≤ n)
@Arjun Sir I think the complexity of inner while loop is 2^k..
and since outer loop is running n times so , the time complexity must be n*2^k..
which is nlogn