collections/lis_utils library

Longest increasing subsequence (LIS) with reconstruction (roadmap #441).

Functions

lisIndices<T extends Comparable<Object>>(List<T> list) List<int>
Returns one LIS as a list of indices into list.
lisLength<T extends Comparable<Object>>(List<T> list) int
Returns length of LIS of list using comparable order, and optionally the indices of one such subsequence (reconstruction).