Count Consistent Strings

Count strings in an array that only contain characters from a given allowed set. Convert the allowed set to a bitmask for O(1) character validation.

Examples
Input: ["ab",["ad","bd","aaab","baa","badab"]]
Output: 2
Hints

Count Consistent Strings

Count strings in an array that only contain characters from a given allowed set. Convert the allowed set to a bitmask for O(1) character validation.