On 12/27/07, Mike Day <[EMAIL PROTECTED]> wrote:
> You actually want to recover the subsequence, and Raul's mss looks
> good, though surprisingly seems to go astray on this example, which
> I'll point out without trying to find out why as my wife wants me to help
> with tidying up now the children have gone -

Good catch!

My routine finds the sequence which contains the maximum
subsequence, but does not necessarily terminate that
subsequence soon enough.

To fix this problem, use ({.~1+[:(i.>./)+/\) on the result of
my mss.

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to