K-th Smallest Element
Medium · rating 1300 · Heap, Sorting
The first line has n and k. The second line has n integers. Print the k-th smallest value (1-indexed; duplicates count).
Constraints: 1 ≤ k ≤ n ≤ 105
Related problems
- Intersection of Two Arrays — Medium
- Leaderboard Ranking — Medium
- Median Value — Medium
- Kth Largest Element — Medium
- Matchmaking Gap — Medium
- Shopping on a Budget — Medium