Medium Accuracy: 52.22% Submissions: 18251 Points: 4
Given an array of n elements, where each element is at most k away from its target position. The task is to print array in sorted form.
First line consists of T test cases. First line of every test case consists of two integers N and K, denoting number of elements in array and at most k positions away from its target position respectively. Second line of every test case consists of elements of array.
Single line output to print the sorted array.