Not Understand the Problem

Sir In this question they are asking for the next permutation only and What is the problem in mine one?

@aryangrover
Hello Aryan ,
please share ur code using coding blocks ide

@aryangrover
hello aryan,
your code is correct u need just two modifications.
a) add this line in ur code using namespace std;
b) there is space between two integer in output but u r not printing any space so print space after printing each integer.

Ohk Sir that I will but no test case is passing. What can I do in that case?

@aryangrover
please share the problem link i will check

https://online.codingblocks.com/app/player/65654/content/45346/7189/code-challenge

@aryangrover
check input format.
u are given t test cases. for each test case u need to read n and n integers and output ur answer correspondingly.

image

Ok Thnx Sir ab kuch smjh aaya krke btata hu


Sir It is again showing errors. Please tell

@aryangrover
hello aryan,
ur code is correct .one small mistake is that return 0 (in line 24) should out of the loop.

1 Like

Thanks a lot Sir. It worked

@aryangrover
badhiya :sunglasses:

1 Like

@aryangrover
bro pls mark it resolved

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.