What is the running time of the following piece of code ?
i=1;
while(i<=n)
{
j=1;
while(j<=n)
j=j*2;
i=i+1;
}
Difficulty level
This exercise is mostly suitable for students
n*log(n)
Back to the list of exercises
Looking for a more challenging exercise, try this one !!
Display the product sign of 2 integers without performing the multiplication