1.

Given a big-oh characterization in terms of 'n' of the running time of the loop1 method shown in the below algorithm.Algorithm loop1 (n)s←0;for i←1 ot 2n dofor j ← 1 ot i dos←s+i;

Answer»

Given a big-oh characterization in terms of 'n' of the running time of the loop1 method shown in the below algorithm.



Algorithm loop1 (n)s0;for i1 ot 2n dofor j 1 ot i doss+i;



Discussion

No Comment Found

Related InterviewSolutions