TORONTO KIDS COMPUTER CLUB | Markham Saturday 14:00 Java Homework 20.07.04.
17898
post-template-default,single,single-post,postid-17898,single-format-standard,ajax_fade,page_not_loaded,,no_animation_on_touch,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Markham Saturday 14:00 Java Homework 20.07.04.

10 Jul Markham Saturday 14:00 Java Homework 20.07.04.

nput 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)
No Comments

Sorry, the comment form is closed at this time.