Consider the following pseudocode fragment. 1: function stars(n) 2: for i ? 1; i ? n; i++
Fantastic news! We've Found the answer you've been seeking!
Question:
Consider the following pseudocode fragment. 1: function stars(n) 2: for i ? 1; i ? n; i++ do 3: Print '*' i times
a) Using the O-notation, upperbound the running time of stars.
b) Using the ?-notation, lowerbound the running time of stars to show that your upperbound is in fact asymptotically tight.
Related Book For
Posted Date: