If selection sort's inner loop starts at i and does half the comparisons, why is it still Theta of n squared?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
Selection sort (the swap-every-time version from the video) runs its first pass on [7, 3, 9, 2, 5, 1, 6]: the element at index 0 is compared with every element after it, and whenever a smaller one turns up the two swap. Work out the list after this first pass only — by hand, or by writing the pass. Assign that list to after.