Anonymous user
Longest increasing subsequence: Difference between revisions
→Python: Patience sorting method: use python slice technique (x[i:i+k] = [...]) to simplify if-else case for replace/append new node
(→{{header|Rust}}: I've reverted the Rust code back to the original submission by Donkey-hotei (though it now takes a slice arg rather than a Vec). The version which had been current gave the wrong answers!) |
(→Python: Patience sorting method: use python slice technique (x[i:i+k] = [...]) to simplify if-else case for replace/append new node) |
||
Line 2,067:
for di in d:
j = bisect_left(pileTops, Node(di, None))
return list(pileTops[-1])[::-1]
|