Find the minimum value of A by interchanging the digit of A and store min1 .
if ( q - p > 0 && q < min1 ) { min1 = q ; _count = 1 ; } } else { for ( int j = i ; j <= n ; j ++ ) { swap ( str1 [ i ] , str1 [ j ] ) ; permutation ( str1 , i + 1 , n , p ) ; swap ( str1 [ i ] , str1 [ j ] ) ; } } return min1 ; }