I have a Huffman encoding represented as a list in the following manner:
encoding = {{{w, d}, {o, s}}, {{{e, q}, a}, {i, j}}};
This means that w
is encoded using $000$, d
is encoded using $001$, e
is encoded using $1000$, and so on. When I print the list in TreeForm
, it looks like this:
Which is pretty fine on its own right, however, I would want to label only the leaves and ignore the internal nodes which say List
. How should I go about doing this?