Marks :10
: 0 | : 0
Given an array and a number $$$K$$$ where $$$K$$$ is smaller than the size of the array. Find the $$$K_{th}$$$ smallest element in the given array. Given that all array elements are distinct.
The first line contains an integer $$$N$$$ denoting the length of the array and an integer $$$K$$$ separated by a space. The second line contains $$$N$$$ separated integers $$$A_{i}$$$ denoting the array.$$$(1 \le N,A_{i} \le 10^5)$$$$$$(1\le K \le N).$$$
Output the $$$K_{th}$$$ smallest element.
5 4 1 33 22 77 3
33
1 1 2
2
2 1 3 1
1
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.