From: Kalman Noel Date: 2007-02-04T19:45:05+09:00 Subject: Re: [QUIZ] String Equations (#112) Ruby Quiz (James E. Gray): > This week's quiz is to write a program that accepts a list of words on STDIN and > outputs any one string equation using those words, assuming there is one. Each > word in the list may be used zero or more times, but only on one side of the > equation. The program should exit(0) on success and exit(1), without printing > any output, if a solution cannot be found. Shouldn't there be a requirement that an equations is invalid if there is another, shorter equation that uses the same words? Otherwise: $ ruby quiz112.rb foo oof "foo" = "oof" "foo" + "foo" = "oof" + "oof" "foo" + "foo" + "foo" = "oof" + "oof" + "oof" ... Kalman