You are viewing a single comment's thread. Return to all comments →
Java 15 Solution:
public static void miniMaxSum(List<Integer> arr) { // Write your code here Integer min=Collections.min(arr); Integer max=Collections.max(arr); Long sumLong=0L; for (Integer integer : arr) { sumLong+=integer; } System.out.print(sumLong-max+" "); System.out.print(sumLong-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 →
Java 15 Solution: