Driver code
public static void main ( String [ ] args ) { int arr [ ] = { 10 , 20 , 30 , 100 , 101 , 102 } ; int N = arr . length ; int K = 3 ; System . out . print ( minDifferenceAmongMaxMin ( arr , N , K ) ) ; } }