-
Notifications
You must be signed in to change notification settings - Fork 0
Add quickselect #20
Copy link
Copy link
Open
Labels
algorithmThis relates to an algorithmThis relates to an algorithmenhancementNew feature or requestNew feature or request
Metadata
Metadata
Assignees
Labels
algorithmThis relates to an algorithmThis relates to an algorithmenhancementNew feature or requestNew feature or request
Issue title
Add quickselect
Issue description
The quickselect algorithm is used to find the k-th smallest element in an unordered sequence.
Details:
Side effects: The sequence becomes partially sorted.
Average-case Time: O(n)
Worst-case Time: O(n^2) --very unlikely
Space: O(n)?, where n is the recursion depth
Checklist