Please,anyone provide me logic and intution of approch to solve this problem
Problem Link: https://www.codechef.com/problems/PERMUTATION_
You can approach two pointers here to solve this problem