Question: Problem 3 : ( 8 pts ) For each piece of pseudocode below, give its Theta estimate. Include a brief informal explanation. a )

Problem 3: (8 pts) For each piece of pseudocode below, give its \Theta estimate. Include a brief informal explanation.
a) AlgorithmA(n)
for i 1 to n do
for j 1 to n^2+1 do
for k 1 to n do
Print(A)
b) AlgorithmB(n)
if n <2 do
Print(B)
else do
for i 1 to 4 do
AlgorithmB(n/2)
Print(B)
c) AlgorithmC(n)
j 1
for i 1 to n do
while j <=8i do
Print(C)
j j +1
d) AlgorithmD(n)
for i 1 to n/2 do
j n
while j >=1 do
Print(D)
j j/4

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 Programming Questions!