question 1
How many comparisons does the sort make lining up the letters of adachafc, the earlier letter first on a tie?
the answer, and why
the answer is A
In letter order the weights are a 3, c 2, d 1, f 1, h 1. The sort lines them up lightest first, the earlier letter first on a tie, with 7 comparisons.
if you chose another
- That counts the 8 letters of the text, but the sort lines up the 5 different letters.
- That is the joins, one fewer than the 5 letters.
- That counts the different letters, not the comparisons between them.