Question: Algorithm ( 2 6 ) Let f ( n ) designate the the number of steps that will be executed in the Algorithm to the

Algorithm
(26) Let f(n) designate the
the number of steps that will
be executed in the Algorithm
to the right. Designate everyone
of (a)-(h) below that are
TRUE for f(n).
Input n
x:=0;y:=0
For k=1 to n-1
For j=1 to k+1
x:=a[k]+b[j]
Next j
Next i
return x
(a)f(n)=O(log10n),i.e.,f(n) is of order at most O(log10n).
(b)f(n)=O(n2), i.e.,f(n) is of order at most o(n2).
(c)f(n)=O(1), i.e.,f(n) is of order at most O(1).
(d)f(n)=O(n), i.e.,f(n) is of order at most o(n).
(e)f(n)=O(n2), i.e.,f(n) is of order at most O(n2).
(f)f(n)=O(n3), i.e.,f(n) is of order at most O(n3).
(g)f(n)=O(n4), i.e.,f(n) is of order at most O(n4).
(h)f(n)=O(2n), i.e.,f(n) is of order at most o(2n).
 Algorithm (26) Let f(n) designate the the number of steps that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!