Question

Question 1 (15 pts) For each of the following program fragments, give an analysis of the running time (using Big-Theta). Assume ‘sum’ and ‘n’ are initialized before running the fragment.