import (
"fmt"
"github.com/chasestarr/selection"
)
func main() {
input := []int{3, 8, 2, 5, 1, 4, 7, 6}
// returns the ith smallest array element
s := selection.Select(input, 4)
fmt.Println(s) // 4
}
-
Notifications
You must be signed in to change notification settings - Fork 0
chasestarr/selection
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Selection algorithm using quicksort partitioning
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published