#include
#include
using namespace std;
int main() {
int t;
cin>>t;
while(t–)
{
long int n;
cin>>n;
int arr[100];
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
next_permutation(arr,arr+n);
for(int i=0;i<n;i++)
{
cout<<arr[i];
}
cout<<endl;
}
return 0;
}
What is wrong in this code
@Kunalgoyal increase the array size to 1001 and while displaying give spaces. i hope its clear if yes don’t forget to mark it as resolved 