Stores the sorted string
char [ ] sorted_s = ( new string ( s ) ) . ToCharArray ( ) ; Array . Sort ( sorted_s ) ; Array . Reverse ( sorted_s ) ; for ( int i = 0 ; i < len ; ++ i ) { if ( s [ i ] != sorted_s [ i ] ) {