What would be an efficient method to find the kth smallest element in an array with worst case time complexity being $ O(n) $?
Asked
Active
Viewed 98 times
1 Answers
1
You can use quickselect with median of medians to find a good pivot so that the total running time is linear in the worst case.

Juho
- 22,554
- 7
- 62
- 115