You are viewing a single comment's thread. Return to all comments →
Here is my Python solution!
def maxMin(k, arr): arr.sort() unfairness = arr[k - 1] - arr[0] for i in range(1, len(arr) - k + 1): unfairness = min(arr[k + i - 1] - arr[i], unfairness) return unfairness
Seems like cookies are disabled on this browser, please enable them to open this website
Max Min
You are viewing a single comment's thread. Return to all comments →
Here is my Python solution!