@@ -0,0 +1,1007 @@
+/**%0D%0A * @(#)Min-Max2.java%0D%0A *%0D%0A *%0D%0A * @author Jonathan Morris%0D%0A * @version 1.00 2017/10/12%0D%0A *%0D%0A * Min-Max%0D%0A * https://www.hackerearth.com/practice/algorithms/searching/linear-search/practice-problems/algorithm/min-max-8/%0D%0A */%0D%0A%0D%0Aimport java.util.Scanner;%0D%0A%0D%0Apublic class Min_Max2 %7B%0D%0A%09%0D%0A%09static Scanner sc = new Scanner(System.in);%0D%0A%09%0D%0A    public static void main(String %5B%5D args) %0D%0A    %7B%0D%0A    %09int N = getInt();%0D%0A    %09int cur,min,max;%0D%0A    %09String num_string = sc.nextLine();%0D%0A    %09int total = 0;%0D%0A    %09String %5B%5D strs = new String%5BN%5D;%0D%0A    %09%0D%0A    %09strs = num_string.split(%22 %22);%0D%0A    %09min = max = Integer.parseInt(strs%5B0%5D);%0D%0A    %09%0D%0A    %09for (String n : strs)%0D%0A    %09%7B%0D%0A    %09%09cur = Integer.parseInt(n);%0D%0A    %09%09total += cur;%0D%0A    %09%09if (cur %3C min) min = cur;%0D%0A    %09%09else if (cur %3E max) max = cur;%0D%0A    %09%7D%0D%0A    %09System.out.println((total-max) + %22 %22 + (total-min));%0D%0A    %7D%0D%0A    %0D%0A    private static int getInt()%0D%0A%09%7B%0D%0A%09%09String strInput = sc.nextLine();%0D%0A%09%09int num = Integer.parseInt(strInput);%0D%0A%09%09return num;%0D%0A%09%7D%0D%0A%7D

A problem in which you must return the sum of the maximum and minimum of N-1 numbers from a list of N numbers.