Question: Implement a method to read crossword puzzles OVERVIEW Purpose: We have discussed recursion and in particular backtracking algorithms (such as Eight Queens). In this assignment
OVERVIEW Purpose: We have discussed recursion and in particular backtracking algorithms (such as Eight Queens). In this assignment you will get some practice at recursive programming by writing a backtracking algorithm to find phrases in a puzzle. Idea: "Word search" puzzles are common in newspapers, on restaurant placemats and even in their own collections within books. These follows: A user is presented with a 2-dimensional grid of letters and a list of words. The user must find all of the words from the list within the grid, indicating where they are by drawing ovals around them. Words may be formed in any direction up, down, left or right (we will not allow diagonals even though most puzzles do allow them) but all of the letters in a word must be in a straight line vary in format from puzzle to puzzle, but one common format is as This idea can be extended to allow phrases to be embedded in the grids. However, requiring an entire phrase to be in a straight line on the board is not practical, as the dimensions of the board would need to be overly large. Therefore, we will still require the letters in each word to be in a straight line, but we are allowed to change direction between words. For example, we might be given the following 10x10 grid of letters a b s t ract ij a t a d tdat a j tbcdcagh tj pbcd r a gh p j s are sfoh s j ared bfoha j e rea ll yre j and the following phrases
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
