← Questions
Best-matching binary pattern with wildcards
0
I was asked this
No reports yet. Sign in to say where you were asked it.
You get a list of patterns over 0, 1 and a wildcard that matches either bit, and a query string of bits. Return the pattern that matches the query best. Agree on what "best" means with the interviewer (for example, the fewest wildcards), and make lookups faster than checking every pattern.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
