Next_permutation(

how it is tracking that the next permutation on a particular array. Like this should be the next permutation.

Hey @gauravlodhi21
the function next_permutation rearranges the elements in the range into the next lexicographically greater permutation

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.

Mam once see my code… Please optimize my code as it is says time limit exceeded
Code link: https://ide.codingblocks.com/s/193843
Question link: https://hack.codingblocks.com/app/contests/1243/435/problem