Two test cases wrong
@samadsid7 hey abdul this is because of that your approach is not 100 percent correct you have to check your output before printing for that you have to make a compare function.
yes …please provide me correct code
i love the way you explain things …amazing…;…please tell me …why have you commented my second swap line …i am writing swap again in the code because during backtrack i am reversing it to original state