Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. 1. Tries:Data structure by searching string keys
  2. 1. R-way tries, even faster than red-black BST and hashing
  3. 2. Store characters in nodes
  4. 3. Store values in nodes corresponding to last characters in keys
  5. 4. Search until the ending character with a non-null value
  6. 5. Insertion: create link until the last character and set value in that node
  7. 6. Node: a value +references to R nodes
  8. 7. Search hit: all L characters, search miss: typical sublinear, space: R null links at each leaf
  9. 8. Spell check: 26-way trie
  10. 9. deletion: set the value to null
  11. 2. Ternary Search
  12. 1. Store characters and values in nodes
  13. 2. Each node has 3 children: smaller, equal, and larger (3-way)
  14. 3. Search: if less left, if greater right
  15. 4. if equal, take the middle link and move to the next key character (+1)
  16. 5. 3 null links in each leaf (less null links than r-way tries if r>3), much space efficient in large R
  17. 6. Space 4N
  18. 7. Hybrid of r^2-way trie and TST: root has r^2 nodes, even quicker
  19. 8. Faster than hashing and more flexible than red-black BST
  20. 3. Character-based operations
  21. 1. Prefix-match, wildcard match
  22. 2. Longest-prefix
  23. 3. Patricia trie: each node represents a sequence of characters
  24. 4. Suffix-tree (Patricia trie of suffixes of a string, linear-time construction)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement