• + 0 comments

    First, find all horizontal and vertical blank positions. At each recursion step, take one word from the list, and find the first blank that matches the word length and partially filled letters. Fill the word in your chosen blank, and solve the recursive problem removing the current blank and word; if this yields a successful solution, then this is the answer; otherwise, try the same chosen blank with the next possible word, and so on iteratively. Base cases are the following: if no blank remains but some words are not used, then return false/empty; if not any word matches the chosen blank, return false/empty; if all blanks are filled and no word is left, return the current puzzle.