19 Jun Markham Saturday 14:00 Java Homework 21.06.12.
Question:
Input N numbers using scanner and find the Kth Smallest number in the array
Sample Input 1: 10 (Hint: Value of N) 12 22 32 1 23 3 4 5 11 100 5 (Hint: Value of K) Sample Output 1: 11 (Hint: Sorted order is 1,3,4,5,11,12,22,23,32,100 so the 5th smallest number is 11)
Sample Input 2: 5 (Hint: Value of N) 12 5 2 66 7 3 (Hint: Value of K) Sample Output 2: 7 (Hint: Sorted order 2,5,7,12,66 so the 3rd smallest number is 7)
Sorry, the comment form is closed at this time.