@@ -0,0 +1,822 @@
+import java.io.*;%0Aimport java.util.*;%0Aimport java.text.*;%0Aimport java.math.*;%0Aimport java.util.regex.*;%0A%0A%0Aclass Difference %7B%0A  %09private int%5B%5D elements;%0A  %09public int maximumDifference;%0A%0A%0A    Difference( int%5B%5D elements ) %7B%0A        this.elements = elements;%0A    %7D%0A%0A    public void computeDifference() %7B%0A        Arrays.sort( elements );%0A        maximumDifference = elements%5B elements.length - 1 %5D - elements%5B 0 %5D;%0A    %7D%0A%7D // End of Difference Class%0A%0Apublic class Solution %7B        %0A  %09public static void main(String%5B%5D args) %7B%0A    %09Scanner sc = new Scanner(System.in);%0A    %09int N = sc.nextInt();%0A    %09int%5B%5D a = new int%5BN%5D;%0A    %0A    %09for (int i = 0; i %3C N; i++) %7B%0A    %09%09a%5Bi%5D = sc.nextInt();%0A    %09%7D%0A%0A      %09Difference D = new Difference(a);%0A%0A        D.computeDifference();%0A%0A        System.out.print(D.maximumDifference);%0A   %7D%0A%7D%0A

Add day 14 solution