You are viewing a single comment's thread. Return to all comments →
List<Int64> minMax = new List<Int64>(); for(int i=0; i < arr.Count(); i++) { var xx = arr.Select(x => Convert.ToInt64(x)).ToList(); xx.Remove(arr[i]); minMax.Add(xx.Sum()); } Console.WriteLine(minMax.Min() + " " + minMax.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 →