Big O Calculation: What could be the big O of these codes:
a)
for(int i = 1; i<=n; i++){ for(int j = 1; j * j < n; j++){ statements; }}
b)
while(n > 1){ n = n/2;}
Explain answer?
Expert Answer
An answer will be send to you shortly. . . . .
Big O Calculation: What could be the big O of these codes:
a)
for(int i = 1; i<=n; i++){ for(int j = 1; j * j < n; j++){ statements; }}
b)
while(n > 1){ n = n/2;}
Explain answer?
An answer will be send to you shortly. . . . .