Skip to content

Latest commit

 

History

History

kth_smallest_element

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Kth Smallest Element

Given an 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.

Input Format
You will be given an array of integers and integer k.

Output Format
You need to print the K th Smallest Element.

Constraints
1 < n < 10^5
1 < a[i] < 10^5
1 < k < 10^5

Sample Input
6
7
10
4
3
20
15
3

Sample Output
7