Skip to content

Instantly share code, notes, and snippets.

@sillypog
Created May 30, 2018 05:12
Show Gist options
  • Save sillypog/e00ddeda68c9d97a0deb995abebfadb0 to your computer and use it in GitHub Desktop.
Save sillypog/e00ddeda68c9d97a0deb995abebfadb0 to your computer and use it in GitHub Desktop.
Checking for multiple children in a trie node
def check_char(["3" | t], current_node) do
if check_char(["b" | t], current_node) do
check_char(["e" | t], current_node)
else
false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment