Skip to content

Commit

Permalink
void return types
Browse files Browse the repository at this point in the history
  • Loading branch information
travissanderson-wf committed Aug 2, 2023
1 parent 834f3ab commit ff2b0fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/r_tree/quickselect.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ multiSelect<E>(List<E> arr, int left, int right, int n, num Function(E) getter)
/// // arr is [39, 28, 28, 33, 21, 12, 22, 50, 53, 56, 59, 65, 90, 77, 95]
/// // ^^ middle index
/// ```
quickSelect<T>(List<T> arr, int k, int left, int right, Comparator<T> compare) {
void quickSelect<T>(List<T> arr, int k, int left, int right, Comparator<T> compare) {
if (arr.isEmpty) {
return;
}

_quickSelectStep(arr, k, left, right, compare);
}

_quickSelectStep<T>(List<T> arr, int k, int left, int right, Comparator<T> compare) {
void _quickSelectStep<T>(List<T> arr, int k, int left, int right, Comparator<T> compare) {
while (right > left) {
if (right - left > 600) {
final n = right - left + 1;
Expand Down Expand Up @@ -95,7 +95,7 @@ _quickSelectStep<T>(List<T> arr, int k, int left, int right, Comparator<T> compa
}
}

_swap<T>(List<T> arr, i, j) {
void _swap<T>(List<T> arr, i, j) {
final tmp = arr[i];
arr[i] = arr[j];
arr[j] = tmp;
Expand Down

0 comments on commit ff2b0fd

Please sign in to comment.