PermutationComparableListExtension<E> extension

on

Methods

nextPermutation({Comparator<E>? comparator}) bool
Permutes this List in-place into the next permutation with respect to the provided comparator. Returns true if such a permutation exists, otherwise leaves the list unmodified and returns false.
previousPermutation({Comparator<E>? comparator}) bool
Permutes this List in-place into the previous permutation with respect to the provided comparator. Returns true if such a permutation exists, otherwise leaves the list unmodified and returns false.