You are viewing a single comment's thread. Return to all comments →
public static void miniMaxSum(List<int> arr_list) { int[] arr = arr_list.Order().ToArray(); long min = 0, max = 0; for(int i = 0; i < 4; i++){ min += arr[i]; max += arr[arr.Length - i - 1]; } Console.WriteLine($"{min} {max}"); }
Seems like cookies are disabled on this browser, please enable them to open this website
Mini-Max Sum
You are viewing a single comment's thread. Return to all comments →