checking if the frequency of the character at position i in x in b is greater than zero or not if zero we increase the prefix count by 1
if ( fr [ x [ i ] - 97 ] > 0 ) { c += 1 ; fr [ x [ i ] - 97 ] -= 1 ; } else break ; } cout << ( c ) << endl ; }