Блог пользователя hARRAY

Автор hARRAY, 11 лет назад, По-английски

can someone explain me,what is the difference between radix tree and suffix tree??

  • Проголосовать: нравится
  • -7
  • Проголосовать: не нравится

»
11 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

A Trie is just a simple structure that you build from a list of words to support efficient O(w) querying/retrieval. 'w' being the length of the query.

A Radix tree is a compressed Trie such that every node necessarily has branching. All paths that look like a linked list are compressed into a single node. Use a Trie or a compressed Trie when you want to build a hash table where the keys will be strings (usually having an upper bound on their length). A Suffix Tree is also a compressed suffix-trie except that it is built on a single string instead of on an array of strings, and given the property of a compressed suffix trie that we saw above, there can be at most O(n) nodes, where 'n' is the number of characters in the string.