(f) (g) int i =n; while (i>1) i = i/2; int i= 1; while (i

icon
Related questions
Question
What is the big O notation for
(f)
(g)
int i = n;
while (i>1) i
int i = 1;
=
1/2;
while(i < n ) i = 2*i;
Transcribed Image Text:(f) (g) int i = n; while (i>1) i int i = 1; = 1/2; while(i < n ) i = 2*i;
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer