class Solution{
//Function to find minimum adjacent difference in a circular array.
// arr[]: input array
// n: size of array
public static int minAdjDiff(int arr[], int n) {
int min=Math.abs(arr[0]-arr[n-1]),diff;
for(int i=0;i<n-1;i++)
{
diff=Math.abs(arr[i]-arr[i+1]);
if(diff<min)
min=diff;
}
return min;
}
}