這是關於在實踐中通常做什麼的問題。 假設我們有一個基數樹與一個條目(不管出於什麼原因,認爲這是對示範單個條目): "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 |