AI engineering glossary · Data structures algorithms

What is quickselect?

Quickselect: An algorithm that finds the k-th smallest item of an unsorted array by partitioning around a pivot as in quicksort but continuing into only the side containing the target. It averages O(n) time.

Level: advancedTopic: Data structures algorithms

Quickselect: an example

To find the median of 1 lakh values, partition around a pivot and recurse into only the half that holds the middle position.

Related terms

More Data structures algorithms terms

Where you learn it

Quickselect is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.