From: Roy Sutton Date: 2006-05-08T05:30:47+09:00 Subject: Re: [QUIZ] Bracket Packing (#78) (solution) Here's a simple solution to the first part. This follows the assumption laid out the machine drops one (and only one) bracket. Also assumes input is a command line argument or comes from standard input. desc = ARGV[0] || $stdin.gets.chomp exit 1 if ((desc.scan(/[\[\]{}()]/).length % 2) == 1) puts desc