please explain me the question not the solution.
this is what i did. i basically rotated the array by 1 and gave it as result. in this case also (Pi!=i)..
package com.company; import java.util.Scanner;
/* * Created by juhi on 24-09-2017./ public class minimum_permutation { private static Scanner sc= new Scanner(System.in);
public static void main(String[] args) {
int testCaseNo,size,arr;
testCaseNo=sc.nextInt();
while(testCaseNo>0)
{
size=sc.nextInt();
fillarray(size);
testCaseNo--;
}
}
public static void fillarray(int size)
{ int j=2;
size--;
while(size >0)
{ System.out.println(j);
j++;
size--;
}
System.out.println("1");
}
}