N Integers – Kth Largest Integer

The program must accept N integers and an integer K as the input. The program must print the Kth largest integer among the N integers as the output.

Example Input/Output 1:
Input:
9 3
38 92 83 58 78 86 20 92 81

Output:
83

Explanation:
Here N=9 and K=3,
The 1st largest integer is 92.
The 2nd largest integer is 86.
The 3rd largest integer is 83, so 83 is printed as the output.

C :

Capture 5
Capture 2
@ Agent FALCON

Python :

Capture 3
Capture 4
Capture 6
@ Agent PARKER
Previous Article

Positions of Smallest and Largest

Next Article

N Vehicles - Number of Passengers

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *