how you come to the answer?? Please explain me the approach
the i loop is running n time .
and inside i loop j loop is running log (n).
log(n) because instead of j++ we are doing j=j*2 . which means for n=32 j loop will run 5 times .
which is log(n) .
so the total complexity will become O(nlog(n)).