Question 5
(10 total points)
In O-notation, what is the worst-case running time of the following code as a function of n? Give the
best answer you can (the most informative symbol with the simplest function). Here A[i,:] represents
the ith row of A. Also assume that the Sort function takes O(nlogn).
input: an n x n matrix A
for i = 1 to n do
Sort(A[i,:])
end for
Return: A