Given a set of numbers from 1 to N, shuffle the numbers such that the absolute difference between the integer in the array Solution and its position i is equal to the number K.
|Solution[i] – i| = K for every i from 1 to N.
If such an order is not possible, Solution is [-1]. The final answer has to be the concatenation of all arrays.
Input Format: First integer represents the value of N, the second represents the value of K.
Output Format: Check the sample link below
Sample Input: link
Kunal Desai : 7715051136
Neelraj Patil : 9930671144