From: gabriele renzi Date: 2007-07-17T02:25:02+09:00 Subject: Re: [QUIZ-Solution] Maximum Sub-Array (#131) On Mon, 16 Jul 2007 23:56:00 +0900, Matthew Moss wrote: >> > irb(main):007:0> max_subarray([-10] ) >> > => [] > > I would say this is wrong. Despite being a negative sum, the non-empty > subarray [-10] still has the maximum sum. I think it makes more sense to choose the zero length array from the point of view of gambling or even better investing money in stocks. The way you're making the most money in a crisis is to avoid investing alltogether. Well, you can do "down speculation" (sorry, don't know the expression in english) and get more stocks for the same money but that's the dual problem :) All in all, matter of specifications. -- goto 10: http://www.goto10.it blog it: http://riffraff.blogsome.com blog en: http://www.riffraff.info