5. [15 points] Analyze the algorithm below to determine the asymptotic upper bound for its worst-case time complexity. M
Posted: Mon Jun 06, 2022 4:32 pm
5. [15 points] Analyze the algorithm below to determine the asymptotic upper bound for its worst-case time complexity. Make your bounds as tight as possible. Justify your answer. void f(int n) { while (n>=1) { for (int i=0; i<n; ++i) { cout << i << " "; } n=n/2; cout << endl; } }