https://github.com/mikedeboer/trie
My take on an efficient implementation of a Trie in Javascript
https://github.com/mikedeboer/trie
digital-search-trees javascript trie
Last synced: 5 months ago
JSON representation
My take on an efficient implementation of a Trie in Javascript
- Host: GitHub
- URL: https://github.com/mikedeboer/trie
- Owner: mikedeboer
- Created: 2010-05-20T16:58:14.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2020-10-15T10:26:38.000Z (almost 5 years ago)
- Last Synced: 2025-05-08T04:52:51.680Z (5 months ago)
- Topics: digital-search-trees, javascript, trie
- Language: JavaScript
- Homepage: http://www.mikedeboer.nl
- Size: 286 KB
- Stars: 74
- Watchers: 3
- Forks: 21
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Trie.js
=======My take on an efficient implementation of a Trie in Javascript
Short story
-----------A Trie is a kind of digital search tree. (See [Knuth1972] for more details on digital search trees.)
[Fredkin1960] introduced the trie terminology, which is abbreviated from "Retrieval".
[Knuth1972] Knuth, D. E. The Art of Computer Programming Vol. 3, Sorting and Searching. Addison-Wesley. 1972.
[Fredkin1960] Fredkin, E. Trie Memory. Communication of the ACM. Vol. 3:9 (Sep 1960). pp. 490-499.
([source][1])
The trie implementation of [Dennis Byrne][2] served as a starting point and inspiration.
For more information, please take a look at the [Wikipedia article][3]
Usage
-----Please take a look at the file
test/test.html
which pretty much explains the things you can do with Trie.js in code.
The test.html file uses a pure JS dataset of 44.830 records, which you can find indata/people_44830.js
More information and full documentation of the API can be found in
docs/index.html
Or read them online at https://mikedeboer.github.io/trie/.License
-------MIT.
Amsterdam, 2010. Mike de Boer.
[1]: http://linux.thai.net/~thep/datrie/datrie.html
[2]: http://notdennisbyrne.blogspot.com/2008/12/javascript-trie-implementation.html
[3]: http://en.wikipedia.org/wiki/Trie