Exercise: Kth Maximum Integer in a List
This exercise is all about finding a particular number in a list!
We'll cover the following
Problem Statement
Given a list of integers and a number k, find the kth largest integer in the list. The integer will be stored in the kth_max
variable.
For example, with a list of 7 integers, if k = 2
, then kth_max
will be equal to the second-largest integer in the list. If k = 6
, kth_max
will equal the 6th largest integer.
Get hands-on with 1200+ tech skills courses.