Solution approch (not code)


#1

point is if the value at index i !=n-i and we have possible swap swap this to value until u have possible swap