Driver Program to test above function
public static void main ( String [ ] args ) { int k = 2 ; int [ ] a = { 1 , 2 , 3 , 4 } ; int n = a . length ; int x = PointInKSquares ( n , a , k ) ; System . out . println ( " ( " + x + " , ▁ " + x + " ) " ) ; } }