Skip to content

Instantly share code, notes, and snippets.

@zargony
Forked from bumi/quiz.rb
Created June 25, 2009 20:33
Show Gist options
  • Save zargony/136147 to your computer and use it in GitHub Desktop.
Save zargony/136147 to your computer and use it in GitHub Desktop.
require 'active_support'
["a","b","a"].sort.join.scan(/a+|b+|c+/).sort_by(&:length).reverse.map(&:first)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment