
If there are ‘5’ questions then the order will be:
“ 2 4 1 5 3 ”
The first line of input contains an integer 'T' representing the number of test cases.
The first line of each test case contains a single integer ‘N’ denoting the number of questions.
For each test case, return the order of the questions separated by space.
The output for each test case is printed in a separate line.
You do not need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 5
1 <= N <= 3000
Where ‘T’ is the number of test cases, ‘N’ is the number of questions.
Time limit: 1 second.
The idea here is to implement the questions as it says because even in the worst case the constraints allow brute force solution.
We will maintain an array/list to check whether a particular question is solved or not.
Algorithm:
Description of ‘findNext’ function.
This function will take three parameters :
Pair Product Div by K
Pair Product Div by K
Merge Two Sorted Arrays Without Extra Space
Merge Two Sorted Arrays Without Extra Space
Co-Prime
First Digit One
Special Digit Numbers