Fresh Beginning
  • Home
  • Portfolio
  • My Clothing Shop
  • Etsy Clothing Store
  • Buy Me A Coffee
  • Patreon
  • Speaking
  • Reading
  • About Me
  • Contact Me
Subscribe

Find kth Max

A collection of 2 posts
Implementing Quick Select Algorithm - Finding kth largest/smallest element
quick-select

Implementing Quick Select Algorithm - Finding kth largest/smallest element

Today I am going to write about a special type of algorithm for finding a kth largest or smallest element in the array. This is my favorite data structure question due to intricacy involved in solving the problem. There are many variants of this problem including more efficient using max/
Jun 7, 2020 4 min read
Interview Questions

Magic of Quickselect/Selection algorithm

Recently I came across an interesting interview question. To find the kth largest or smallest element in the given array. Please remember that array is unsorted. The problem becomes cakewalk if array is sorted. In its simplest form, if an array a of size n is already sorted, you can
Jun 13, 2017 6 min read
Fresh Beginning © 2025
Powered by Ghost