Question: 115
(Choose 1 answer)
(See picture)
A. (i)
B. (ii)
C. (iii)
D. (iv)
Give a big-O estimate for the number of operations (where an operation is an addition or a multiplication) used in this segment of an algorithm.
k := 0 for i:=1 ton-1 for j:= i to 2* i k := k + i* j +i*j
end end
(i) 0(n)
(ii) O(nlogn)
(iii) O(n²)
(iv) O(n)