🛠️ Steven Gong

Search

SearchSearch
  • Quickselect
  • Related

Nov 29, 2024, 1 min read

Quickselect

Quickselect is a selection algorithm to find the kth smallest element in an unordered list, also known as the kth order statistic.

Learned in CS240.

Best Case: O(n) Average Case: O(n) Worst Case: O(n2) (? not sure)

https://www.freecodecamp.org/news/quickselect-algorithm-explained-with-examples/

How to choose pivot? I think we just do random index. There’s also median of three. See Quick Sort.

Related

  • Quick Sort

Graph View

Backlinks

  • CS 240 - Data Structures and Data Management
  • Median
  • Partition
  • k-th smallest element in Array

Created with Quartz, © 2025

  • Blog
  • LinkedIn
  • Twitter
  • GitHub