You are viewing a single comment's thread. Return to all comments →
You dont need two result longs:
long sum = 0; long min = arr.Min(); long max = arr.Max(); for (int i = 0; i<arr.Length; i++){ sum = sum + arr[i]; } Console.WriteLine("{0} {1}",sum-max,sum-min);
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 →
You dont need two result longs: