Test case is wrong for Kth Smallest testcase where B us 22


#1

A : [ 60, 94, 63, 3, 86, 40, 93, 36, 56, 48, 17, 10, 23, 43, 77, 1, 1, 93, 79, 4, 10, 47, 1, 99, 91, 53, 99, 18, 52, 61, 84, 10, 13, 52, 3, 9, 78, 16, 7, 62 ] B : 22

Your are showing 52 as expected output but 52 has 23 smaller or equal values in array not 22.
none of the elements has 22 as the value.

Please fix the testcase.


#2

kth smallest element is the minimum possible n such that there are at least k elements in the array <= n.
So, 52 has 23 such elements, but it is the minimum element to satisfy this criteria.