Computer Science, asked by riteshchauhan9289, 11 months ago

Ublic interface foo { int k = 4; /* line 3 */ } which three piece of codes are equivalent to line 3? Final int k = 4; public int k = 4; static int k = 4; abstract int k = 4; volatile int k = 4; protected int k = 4; 1, 2 and 3 2,3 & 4 3, 4 and 5 4, 5 and 6

Answers

Answered by hams786
0

Answer:

Evaluate Time complexity for For loop

Programmid

1

int fun(int n) {

int count=0;

for(int i = n;i>0; i/=2)

for(int j=0; j <i; j++)

count += 1;

return count;

- Problem

Solving -

What is the run time complexity of the above code?

Pick one of the choices

O O(n)

O(n log n)

Similar questions