algorithm - Radix Tree nodes -
i've been working on implementation of radix tree (for strings/char arrays), i'm having of dilemma figuring out how store tree nodes children of particular tree nodes.
i've seen linked list implementations used in trie's (somewhat similar radix trees) , possibly radix trees (it's been while since i've last researched topic), seems it'd perform poorly if have set of data contains lots of common prefixes.
now i'm wondering using data structure (e.g. binary search tree) better design choice? think can see substantial speed improvement on simple linked list (o(log(n)) vs. o(n)) when there data large number of common prefixes, there substantial compromises performance elsewhere?
in particular i'm worried cases there aren't large number of common prefixes, or other possible obstacles may cause 1 choose linked list on binary search tree.
alternatively, there better (i.e. faster/uses less memory) method storing children nodes?
you want kart-trie. kart-trie uses bst data structure simple hash. can find description here: http://code.dogmap.org/kart.
Comments
Post a Comment