hARRAY's blog

By hARRAY, 12 years ago, In English

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

  • Vote: I like it
  • -7
  • Vote: I do not like it

| Write comment?
»
12 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

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.