secret
Created

Solution to Lambdaheads 2012-01-09 challenge

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5
str = [%w(YYYY MM DD), %w(YY MM DD)].map do |ss|
(1..ss.size).map { |n| ss.permutation(n).to_a }
end.flatten(2).uniq.map(&:join)
 
puts Regexp.union(str)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.