The Boggle Game |
The language PigEwu has a very simple syntax. Each word in this language has exactly 4 letters. Also each word contains exactly two vowels (y is consider a vowel in PigEwu). For instance, "maar" and "even" are legitimate words, "arts" is not a legal word.
In the game boggle, you are given a 4x4 array of letters and asked to find all words contained in it. A word in our case (PigEwu) will thus be a sequence of 4 distinct squares (letters) that form a legal word and such that each square touches (have a corner or edge in common) the next square.
For example:
A S S D S B E Y G F O I H U U K
In this board a (partial) list of legal words include:
ASGU SABO FOIK FOYD SYDE HUFO
BEBO is a legal word but it is not on this boggle board (there are no two B's here).
Write a program that reads a pair of Boggle boards and lists all PigEwu words that are common to both boards.
D F F B W A S U T U G I B R E T O K J M Y A P Q K M B E L O Y R Z W A V G S F U U N C O A H F T Y T G I G N A L H G P M B O O B #
There are no common words for this pair of boggle boards. ANGO AOGN GNAO GOAN NAOG NGOA OANG OGNA