这是关于在实践中通常做什么的问题。 假设我们有一个基数树与一个条目(不管出于什么原因,认为这是对示范单个条目): "tests are really hard, no one likes taking tests, they're the worst"
然后,我们希望把在第二项 "team"
我们想从根边缘结束了 "te"
和两个边的从一与 "sts are really hard,
我正在考虑使用霍夫曼编码压缩文本,但与变量长度(字符串)的符号。例如(使用下划线作为空格): huffman-code | symbol
------------------------------------
00 | _
01 | E
100 | THE
101 | A
1100 | UP
1101 | DOWN
11100 | .
11101 |