Reverse String for A [ n - 1 ] to length
reverseStr ( A [ n - 1 ] , s . Length ) ; } static String swap ( int i , int j ) { char [ ] ch = s . ToCharArray ( ) ; char temp = ch [ i ] ; ch [ i ] = ch [ j ] ; ch [ j ] = temp ; return String . Join ( " " , ch ) ; }