β back to unit
Medium
# sorting medium
The Third-Tallest Sunflower
The garden contest gives a special ribbon to the THIRD-tallest sunflower, just to keep things interesting. π»
You get at least three heights, all different. Print the third-tallest.
Example:
Input: heights = [150, 90, 120, 180]
Output: 120
Sorted tallest-first gives [180, 150, 120, 90] β the third one down is 120.
π‘ need a hint?
sort-third-tallest.pyπ given lines are locked β write your code in between
loading...