Skip to content

Instantly share code, notes, and snippets.

@jkulton
Created December 3, 2022 05:34
Show Gist options
  • Save jkulton/77fa5cd0649939d68eb20ef2a6ca37de to your computer and use it in GitHub Desktop.
Save jkulton/77fa5cd0649939d68eb20ef2a6ca37de to your computer and use it in GitHub Desktop.
input = "vJrwpWtwJgWrhcsFMMfFFhFp
jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL
PmmdzqPrVvPwwTWBwg
wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn
ttgJtRGJQctTZtZT
CrZsJsPPZsGzwwsLwLmpwMDw"
priorities = ('a'..'z').to_a + ('A'..'Z').to_a
def string_split_half(str)
half = str.size / 2
[str[0, half], str[half - 1, half]]
end
input.split("\n").each do |bag|
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment