Generate a Permutation of First N Natural Numbers having Count of Unique Adjacent Differences Equal to K MEDIUM
In this article, we will learn how to solve the problem of finding a permutation of n numbers such that the number of unique differences between adjacent numbers is equal to k