Home /
Expert Answers /
Computer Science /
what-is-the-time-complexity-of-the-following-code-show-that-it-is-o-n-2-int-count-0-for-int-i-pa700
(Solved): What is the time complexity of the following code? Show that it is O(n^2)
int count= 0;
for (int i ...
What is the time complexity of the following code? Show that it is O(n^2)
int count= 0;
for (int i = 1; i < n; i *=2)
for (int j = 0; j < i; j ++)
for (int k = 0; k< n; k ++)
count++;