|
Post by arnabbiswas on Apr 13, 2020 12:09:14 GMT -5
Given an unsorted array and a number k where k is smaller than size of array, we need to find the k’th smallest element in the given array. It is given that all array elements are distinct.
Examples:
Input: arr= [7, 10, 4, 3, 20, 15]
k = 3
Output: 7
Input: arr = [7, 10, 4, 3, 20, 15]
k = 4
Output: 10
|
|