Exercises from Chapter 5 5.18 5.21 Solutions 5.18 (a) The heap nodes are stored in the array in the order 6 5 3 4 2 1. Node 7 has been moved to the end of the array. (b) The heap nodes are stored in the array in the order 7 4 6 3 2 1. Node 5 has been moved to the end of the array. 5.21 Reading off the leaves of the Huffman tree and their codes: L 00 H 010 I 011 E 1000 F 1001 J 101 D 11000 A 1100100 B 1100101 C 110011 G 1101 K 111 The average code length of a word of length n is 3.23445n.