COMPSCI 61B Lecture Notes - Lecture 37: Radix, Glossary Of Ancient Roman Religion, Trie

75 views6 pages

Document Summary

Tries will be roughly analogous to digit-by-digit radix sorting. Given a trie with n keys, and a key with l digits. Assume that the child can be found in constant time. In comparison, hashtable: theta(nl) worst case, theta(l) typical case, theta(l) best case. Like bsts, comparison is done digit-by-digit, allowing us to skip some characters. Hash tables may look at many unnecessary characters as the full hashcode needs to be computed. Like hash tables, searching is constant with respect to the number of keys. Theoretical asymptotic speed improvement is nice, but main appeal of tries is their ability to support rapid pre x matching and approximate matching. Finding all keys that match a given pre x. Somewhat counter-intuitive but easiest java representation of a trie does not store letters inside nodes, instead letter is stored implicitly on each link. For non smart-phone users, texting usually involves coopting your number buttons to type messages.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers