Print the answer
Console . Write ( " [ " ) ; for ( int i = 0 ; i < ans . Count ; i ++ ) { Console . Write ( ans [ i ] ) ; if ( i != ans . Count - 1 ) { Console . Write ( " , ▁ " ) ; } } Console . Write ( " ] " ) ; return 0 ; } static String reverse ( String input ) { char [ ] a = input . ToCharArray ( ) ; int l , r = a . Length - 1 ; for ( l = 0 ; l < r ; l ++ , r -- ) { char temp = a [ l ] ; a [ l ] = a [ r ] ; a [ r ] = temp ; } return String . Join ( " " , a ) ; }