Meta·Software Engineer·Technical Phone Screen
- Given a target string and a list of candidate strings, return the candidates whose set of distinct characters is entirely contained within the distinct character set of the target string.
“The key move is encoding each string as a bitmask over the alphabet, then checking if the candidate's bits are all present in the target's bits using bitwise AND against the complement.”