Longest increasing subsequence: Difference between revisions
Content added Content deleted
(+ D entry) |
(Fixed a comment in D entry) |
||
Line 17: | Line 17: | ||
/// Return one of the Longest Increasing Subsequence of |
/// Return one of the Longest Increasing Subsequence of |
||
// items using patience sorting. |
/// items using patience sorting. |
||
T[] lis(T)(T[] items) if (__traits(compiles, T.init < T.init)) { |
T[] lis(T)(T[] items) if (__traits(compiles, T.init < T.init)) { |
||
if (items.empty) |
if (items.empty) |