of the new value) to constant time (just like Rand() is), we would still need to traverse
through every element in the array in order to modify the value at that place. Doing
this would still take Ω(
n
2
) which is the same order of magnitude as part (a).

CS170–Fall 2014 Homework 3 Krishna Parashar,
cs170-hm
3
3. Dominated?
return true
return false
Running time:
O
(
nlog
(
n
)) for your favourite sorting algorithm (I like Quicksort)
Proof of Correctness (Proof by Contradiction):
Are initial conditions are that that in our
sorted
array the value at A[x][y] where
x
6
= 0
6
=
y
.