Analyze the running time of the following algorithm by counting the operations; give it as a recurrence.
Fantastic news! We've Found the answer you've been seeking!
Question:
Analyze the running time of the following algorithm by
counting the operations; give it as a recurrence. Then solve the re-
currence to find a closed form expression for the running time of the
algorithm (you can leave it in big-Oh format). You can assume n is a
power of 2.
Bogus_Algorithm(n)
if n=1 return()
for i=1 to n/2 do
{print(*)}
Bogus_Algorithm(n/2)
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Posted Date: