Q8 huffman - greedy quiz

Q8. Huffman
Consider the following message: aabbbbabccdddccccbbdd
Find the number of bits required for Huffman encoding of the above message:


freq of a-3, b- 7, c-6, d-5… so huffman encodingshould be -

b - 0
c - 10
d - 110
a - 1110

therefore total # of bits = 3 * 4 + 7 * 1 + 6 * 2 + 5 * 3

= 12 + 7 + 12 + 15 = 46, but given answer is 42. how??