Created
July 28, 2012 19:44
-
-
Save gonzedge/3194527 to your computer and use it in GitHub Desktop.
Version 0.4.2 of the Rambling Trie has been released!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trie.each do |word| | |
puts "#{word} is included!" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trie = Rambling::Trie.create | |
(%w(some words and other stuff)).each |word| | |
trie << word | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trie.any? { |word| word.include? 'x' } | |
trie.all? { |word| word.length > 0 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment