Skip to content
Tries for efficient automatic word completion in Python, C++, Ruby & Java.
Scala Go Ruby Java Python C++
Latest commit 8a27a93 Apr 16, 2015 @vivekn Merge pull request #7 from colindean/master
Adds Scala version

Autocomplete with Trie

Tries for efficient automatic word completion in several languages.


  • C++ - Vivek Narayanan (@vivekn)
  • Go - Martijn van Maasakkers (@mvmaasakkers)
  • Java - Marcus McCurdy (@volker48)
  • Python - Vivek Narayanan (@vivekn)
  • Ruby - Colin Dean (@colindean)

Want to add an implementation? Submit a pull request! Please also submit tests and preferably a benchmark, too.

How to Use

See the tests or the benchmarks for examples, but the general gist is something like this, in Ruby notation:

trie =
array_of_words_that_begin_with = trie.autocomplete("wo")

License - BSD

Something went wrong with that request. Please try again.