What’s wrong in my code for https://www.codechef.com/IARCSJUD/problems/NEXTPERM
https://www.codechef.com/viewsolution/30559344
Test case:
5 1
1 3 2 5 4
correct output:
1 3 4 2 5
Your output:
1 3 3 4 5
Also did you know?
https://www.codechef.com/viewsolution/30560257
1 Like
Thanks bro