(Solved) : Find Time Complexity Code Understand First Loop J Time Complexity Log N Also Know Second L Q44135849 . . .
To find the time complexity for this code, I understand that thefirst while loop (i > j) will have a time complexity of log n. Ialso know that the second while loop (j > n) will have a timecomplexity of log n. However, when I get to the third while loop (k< n) I was told the time complexity is n/2 but I don’tunderstand how. Can someone explain why that’s the answer? Is thatthe amount of time it takes for the loop to finish?

i = n; while (i > 1) { j = i; while (j < n) { k = 0; while (k < n) { k += 2; j *= 2; i /= 2; Show transcribed image text i = n; while (i > 1) { j = i; while (j
Expert Answer
Answer to To find the time complexity for this code, I understand that the first while loop (i > j) will have a time complexity of…
OR