Function to calculate maximum difference between adjacent elements excluding every array element once
static void maxAdjacent ( int [ ] arr , int N ) { ArrayList < Integer > res = new ArrayList < Integer > ( ) ;