Skip to content

TeodorDyakov/wildcard-trie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

wildcard-trie

A trie that stores strings. It can be quiried using wildcard syntax. currently the '*' and '?' wildcards are supported.

Example use:

Trie t = new Trie(new String[] { "cafe", "coffee", "caffe", "cup", "java", "kaffe" });

   	System.out.println(t.wildcardMatches("c*"));
   	// [cafe, caffe, cup, coffee]
   	System.out.println(t.wildcardMatches("c*e*"));
   	// [cafe, caffe, coffee]
   	System.out.println(t.wildcardMatches("?affe"));
   	// [caffe, kaffe]