previous
|
start
|
next
Self Check
Why do we need the
temp
variable in the
swap
method? What would happen if you simply assigned
a[i]
to
a[j]
and
a[j]
to
a[i]
?
What steps does the selection sort algorithm go through to sort the sequence
6 5 4 3 2 1
?
previous
|
start
|
next