quickselect icon indicating copy to clipboard operation
quickselect copied to clipboard

Go implementation for finding the smallest k elements in a set.

Results 3 quickselect issues
Sort by recently updated
recently updated
newest added

The following input data: arr := []int{65, 28, 59, 33, 21, 56, 22, 95, 50, 12, 90, 53, 28, 77, 39} pivot := 8 _ = quickselect.IntQuickSelect(arr, pivot) reorders the...

Did you check https://github.com/keegancsmith/nth? "It has a deterministic O(n) runtime..." Sounds better.

The documentation and an error message uses `[0, data.Len())` where it really means `(0, data.Len()]`. 0 is not an accepted value, but data.Len() is.