Equal values must not swap.
transcript
Two entries have the same time. One arrived first. A sort should keep that order. Does yours?
The entries are two a, two b and one c. We sort by the number only. The two twos are equal. Entry a came before entry b. Ties are common in real data. The sorted list should show a, then b.
Shift on greater or equal. The result is one c, two b, two a. The equal entries swapped. Shift on strictly greater. The result is one c, two a, two b.
Order matters in many lists. Statements keep entries in posted order. Logs keep lines in arrival order. Sorting by two keys relies on it. Stability is free with a strict test.
Selection sort swaps values far apart. A swap can carry a value past an equal one. So it is not stable. Use insertion when order matters.
Shift only strictly larger values. Full breakdown in the lecture.