Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Tries for efficient automatic word completion in Python, C++, Ruby & Java.

branch: master

Merge pull request #5 from colindean/master

Add readme, make benchmarks executable from root dir or benchmarking dir
latest commit 288b8aaea2
Vivek Narayanan authored
Octocat-spinner-32 benchmarking
Octocat-spinner-32 java
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 trie.h
Octocat-spinner-32 trie.py
Octocat-spinner-32 trie.rb
README.md

Autocomplete with Trie

Tries for efficient automatic word completion in several languages.

Implementations

  • C++ - Vivek Narayanan (@vivekn)
  • 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 = Trie.new
trie.insert("word")
array_of_words_that_begin_with = trie.autocomplete("wo")
Something went wrong with that request. Please try again.