monmohan / dsjslib

A library implementing several standard data structures and utilities, in JavaScript. Its written and tested using Node.js which is the target platform.
MIT License
773 stars 68 forks source link

TernarySearchTrie().delete has bugs. #10

Open ghost opened 9 years ago

ghost commented 9 years ago

You forgot it is not a binary-search-trie, the leftmost child of the right trie, suc, may have two children (suc.e and suc.g).

https://github.com/monmohan/dsjslib/blob/master/lib/TernarySearchTrie.js#L89-L100