[Tutor] terminology

John Fouhy john at fouhy.net
Tue Dec 6 05:04:57 CET 2005


On 06/12/05, david <din22 at earthlink.net> wrote:

> suppose you have a list of words and you want to unambiguously identify
> each word in the list with the shortest number of characters.
> for instance a list like : kill, kiss, take
> i would want to get take just by typing t.
> but you would have to type kil or kis to get kill or kiss.
> where should i start googling? is this a matter of sorting?
> i was thinking of trees for some reason.

Look for tries :-) http://en.wikipedia.org/wiki/Trie or
http://www.nist.gov/dads/HTML/trie.html

I think there's a couple of good python implementations around that
you could google for..

--
John.


More information about the Tutor mailing list