dart.pkg.collection.algorithms library
Import collection.dart
instead.
Functions
-
binarySearch<
T>( List< T> sortedList, T value, { int compare(T a, T b) }) → int -
Returns a position of the
value
insortedList
, if it is there. [...] -
insertionSort<
T>( List< T> list, { int compare(T a, T b), 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 a, T b) }) → 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 a, T b) }) → 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. [...]