Description
Solutions
Submission
Kth Smallest in Subarray 🍒

Given an array arr, return the kth smallest integer for each subarray of size m.

Example 1:

Input:  arr = [3, 1, 4, 2], k = 2, m = 3
Output: [3, 2]
Explanation:
In the first subarray of size 3 ([3,1,4]) the 2nd smallest element is 3. In the second subarray of size 3 ([1,4,2]) the 2nd smallest element is 2.
Constraints:
    N/A
Thumbnail 0
Testcase

Result
Case 1

input:

output: