Driver code
public static void main ( String args [ ] ) { int [ ] arr = { 8 , 4 , 4 , 8 , 12 , 3 , 2 , 9 } ; int K = 3 ; int n = arr . length ; System . out . print ( maxPointCount ( arr , K , n ) ) ; } }