dart.pkg.collection.algorithms library Null safety
Import collection.dart
instead.
Functions
-
binarySearch<
T> (List< T> sortedList,T value, {int compare(T, T )} ) → int -
Returns a position of the
value
insortedList
, if it is there. [...] -
insertionSort<
T> (List< T> list,{int compare(T, T ), int start: 0, int? end} ) → void -
Sort a list between
start
(inclusive) andend
(exclusive) using insertion sort. [...] -
lowerBound<
T> (List< T> sortedList,T value, {int compare(T, T )} ) → int -
Returns the first position in
sortedList
that does not compare less thanvalue
. [...] -
mergeSort<
T> (List< T> list,{int start: 0, int? end, int compare(T, T )} ) → void -
Sorts a list between
start
(inclusive) andend
(exclusive) using the merge sort algorithm. [...] -
reverse(
List list, [int start = 0, int? end] ) → void - Reverses a list, or a part of a list, in-place.
-
shuffle(
List list, [int start = 0, int? end] ) → void - Shuffles a list randomly. [...]