C # program to generate permutations with only one swap allowed .
using System ; public class GFG { static void findPermutations ( char [ ] str , int index , int n ) { if ( index >= n || ( index + 1 ) >= n ) { Console . WriteLine ( str ) ; return ; }