Perl: the Markov chain saw | |
PerlMonks |
Re^2: Puzzle: Longest Increasing Sequenceby ivancho (Hermit) |
on Apr 16, 2006 at 18:54 UTC ( [id://543681]=note: print w/replies, xml ) | Need Help?? |
that's exponential, unfortunately. Try it on a sorted array, and you'll end up going through all possible subsequences.
Update: not to mention that you'll run out of memory on a list longer than 20 elements..
In Section
Seekers of Perl Wisdom
|
|