


For N = 5 , K = 2
Series = [ 5, 3, 1, -1, 1, 3, 5]
The first line of input contains a single integer T, representing the number of test cases or queries to be run
The first line of each test contains two space-separated integers N and K.
For each test case, print a single line containing the required series.
You do not need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 100
1 <= N <= 3000
1 <= K <= N
Time Limit: 1sec
The idea here is to use recursion,we can print current N two times in the current recursion stack. One for decreasing order and one for increasing order.
Sorted Doubly Linked List to Balanced BST
Longest Substring with K-Repeating Characters
Expression Add Operators
Gray Code Transformation
Count of Subsequences with Given Sum