Selection Algorithm/Problem
Find the kth smallest item in an array of distinct numbers.
Solutions:
- Make passes through the array, deleting the minimum number each time
- Sort , then return
- Scan the array and maintain the smallest numbers seen so far in a max-heap
- Create a min-heap with [Heapify]. Call deleteMin(A) times
Questions
- Which of the following options correctly represents the selection problem?
- Given an array of size and an integer , a solution to the selection problem returns the item that would be at index in the sorted array.