Feedback for subjective question
Question 1: Using big-oh notation, give the running time of the following piece of code. Briefly justify your answer.
for (i = 1; i <= n; i++)
for (j = 1; j <= n/2; j++)
for (k = 1; k <= j; k++)
cout << "hello world ";
for (i = 1; i <= n; i++)
for (j = 1; j <= n/2; j++)
for (k = 1; k <= j; k++)
cout << "hello world ";
Current Answer:
Be the first to post an answer to earn 100CR.