From: "Eric I." Date: 2007-12-02T08:05:13+09:00 Subject: Re: Postfix to Infix (#148) On Dec 1, 5:27 pm, Todd Benson wrote: > On Dec 1, 2007 4:18 PM, Daniel Martin wrote: > > > "Christian von Kleist" writes: > > But: > > > '1 2 - 3 4 - -' should become '1 - 2 - (3 - 4)' > > Or '1 - 2 - 3 + 4' (yikes!) :^0 Well one feature of the Ruby Quiz is that our Quiz Master generally allows submitters quite a bit of flexibility in reinterpreting the problem. To me, however, that form seems outside the problem description, as you're a) applying the distributive property, and b) ending up with a different set of operators than what you started with (from 3 minuses to 2 minuses and 1 plus). And once you start down the road '4 2 3 + *' could become '4 * (2 + 3)', '8 + 12', or even '20'. Eric ==== Are you interested in on-site Ruby training that's been highly reviewed by former students? http://LearnRuby.com