Solutions in Ruby