Skip to content

Instantly share code, notes, and snippets.

@quanon
Created November 25, 2016 13:54
Show Gist options
  • Select an option

  • Save quanon/1ba7026699ac29af8e2300b482ff4d04 to your computer and use it in GitHub Desktop.

Select an option

Save quanon/1ba7026699ac29af8e2300b482ff4d04 to your computer and use it in GitHub Desktop.
def stack(current, result)
unless current.length < 4
result << current
return
end
stack(current + 'a', result)
stack(current + 'b', result)
stack(current + 'c', result)
stack(current + 'd', result)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment