NVIDIA / NVIDIA/cccl

Quickselect algorithm to select kth smallest element

Open
#931 8 comments 0 reactions 1 assignee Claimed by @elstehle View on GitHub
2024-2025 goal
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

I think it would be valuable for the users (at least for me) to have a quickselect algorithm (or any alternative algorithm) to find the kth smallest element in a given array (and a segmented version). We can currently achieve this by using sort and segmented sort but the sorting cost is likely higher than determining the kth smallest element using a more specific algorithm for the task.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.