All digits of num are not present in string s
if ( In == - 1 ) { return num ; } for ( char dig = num [ In ] ; dig >= '0' ; dig -- ) { if ( vis_s [ ( int ) dig - '0' ] == false ) { num = num . Substring ( 0 , In ) + dig + num . Substring ( In + 1 , n - In - 1 ) ; break ; } } char LargestDig = '0' ; for ( char dig = '9' ; dig >= '0' ; dig -- ) { if ( vis_s [ dig - '0' ] == false ) {