GEICO reporting tools often process sorted numeric arrays, such as ordered claim amounts or customer response times. Given a non-empty array sorted in nondecreasing order, return its minimum and maximum values.
Use the ordering property rather than scanning every element. The result must contain the minimum first and the maximum second.
Implement find_min_max(nums).
nums, a non-empty list of integers sorted in nondecreasing order.[minimum, maximum].def find_min_max(nums):