Word Puzzle
Task
You are going to search M words in an N × N puzzle. The words may have
been placed in one of the four directions as from (i) left to right (E), (ii) right
to left (W), (iii) up to bottom (S), or (iv) bottom to up (N). The program
will print the starting place and the direction of each word.
Limitations
The number of words to be searched can be at most 100, the size of the
puzzle N can be minimum 5 maximum 20.
Implementation
The puzzle and the words to be search will be declared as constant array. The
names of the contants will be puzzle and words respectively. For example:
char* puzzle[6] = {"ebzrys",
"rsygaf",
"caakce",
"avcmre",
"nolnoc",
"droguz"};
char* words[5] = {"ercan", "olcay", "conlon", "oguz", "cprog"};
Sample Output
Word ercan at 1, 1 direction S
Word olcay at 6, 3 direction N
Word conlon at 5, 6 direction W
Word oguz at 6, 3 direction E
Word cprog can not be found
Important Notice
When the assistants check your program, they will not only change the contents
of the puzzle and words but also sizes of those arrays (N and M). Write
your code considering this.