K-th smallest
mediumSorting and searching20 XP
Return the k-th smallest number in nums, counting from 1 (repeats count separately).
Examples
- Input: nums = [7, 3, 9, 1], k = 2Output: 3
- Input: nums = [1], k = 1Output: 1
Examples use JSON: true/false/null are True/False/None in Python.