The test's questions that a run answers, asked again on new numbers whenever you like. The answer, its working and the reason for every other choice come from huffman coding's own run on the numbers shown.
choose one
1question 1
How many comparisons does the sort make lining up the letters of deadbeef, the earlier letter first on a tie?
the answer, and why
the answer is D
In letter order a 1, b 1, d 2, e 3, f 1; on a tie, the earlier letter goes first. Round 1: a with b and d with e, 1 each. Round 2: a, b with d, e takes 2, as both of the right run weigh more. Round 3: a, b, d, e with f takes 3, f going after a and b. That is 7.
if you chose another
AThat counts the 8 letters of the text, but the sort lines up the 5 different letters.
BThat is the joins, one fewer than the 5 letters.
CThat counts the different letters, not the comparisons between them.