good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: Patience Sorting To Find Longest Increasing Subsequenceby Limbic~Region (Chancellor) |
on May 04, 2006 at 12:40 UTC ( [id://547403]=note: print w/replies, xml ) | Need Help?? |
TedPride,
Per our /msg conversation, here is a version of my implementation that uses a binary search: It does not currently handle exact matches since there should not be any duplicates in the list (1..N). I did leave this open as a question to ponder and it should be fairly trivial to adapt if you decide it is safe to do so ;-) Cheers - L~R
In Section
Meditations
|
|