package test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class test {
public static void main(String[] args) {
int a[] = {846,8,9,134,45,67,44,5,44,55,45,9,23,46,47,234,55,48,49,1,3,5,78,50,6,7};
ArrayList<Integer> b = new ArrayList<Integer>();
for(inti = 0 ; i <a.length; i++){
b.add(a[i]);
}
int gap = 1;
for(gap = 1;gap < b.size() ; ){
for(inti = 0; i < b.size() ; ){
if(!(b.contains(b.get(i) -gap) || b.contains(b.get(i) + gap))){
b.remove(i);
}else{
i++;
}
}
gap++;
}
System.out.println(gap);
System.out.print(true);
}
}