Function to generate a permutation of integers from 1 to N such that the absolute difference of all the two consecutive integers give K distinct integers
static void printPermutation ( int N , int K ) {