Function to return number of pairs whose concatenation contain all digits from 0 to 9
function countPair ( str , n ) { let cnt = new Array ( 1 << 10 ) ; for ( let i = 0 ; i < cnt . length ; i ++ ) { cnt [ i ] = 0 ; }