harbor run -t openthoughts/tasktrove-mix-h11-single-skill-only-v2-mix-h11-single-skill-0333
harbor download openthoughts/tasktrove-mix-h11-single-skill-only-v2-mix-h11-single-skill-0333
Implement a function named find_sum_of_min_max that takes an array of integers and its size as input and returns the sum of the minimum and maximum elements in the array.
find_sum_of_min_max
def find_sum_of_min_max(A: List[int], N: int) -> int:
The function should accept the following parameters:
A
A[i]
N
The function should compute the minimum and maximum values from the list A:
0
The function should return the sum of the minimum and maximum values as an integer.
Input:
Output:
find_sum_of_min_max([3, 1, 4, 1, 5], 5)
6 # (1 + 5)
find_sum_of_min_max([], 0)
Please implement this function in a file called /app/solution.py.
/app/solution.py