import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] a = new int[n]; for(int a_i=0; a_i < n; a_i++){ a[a_i] = in.nextInt(); } // your code goes here int[] absArray = getAbs(a); int max = getMax(absArray); int[] finList = new int[a.length-1]; for(int x = 0; x max){ max = array[y]; } } return max; } public static int getMin(int index, int max, int[] array){ int min = max; for (int x = index; x < array.length; x++){ int temp = array[index] - array[x]; if(Math.abs(temp) < min && Math.abs(temp) > 0) { min = Math.abs(temp); } } return min; } }