Pattern Matching Hints

advanced

An advanced feature: when the player is stuck, they can ask for hints. The game shows all words from a list that could match the current state of the board.

Given a masked word like "a _ _ l e", which words could it be? "apple" matches, but "ample" does not (the l is in the wrong position).

In this problem, you will build:

  1. matchWithGaps: check if a word matches a partially revealed pattern
  2. getHints: filter a word list to find all matches

Steps