Word puzzle problem is to find the words in a two-dimensional array of characters. The input to this problem is two input files: one is a two-dimensional array of characters and the other is a list of words we will find in two-dimensional array. These words may be horizontal, vertical, or diagonal in any direction (for a total of eight directions). Let’s look at a simple example with chars: A 2-D 7x7 puzzle and a word list file are as follows: See image.
Write a program to find for this problem and run your program with two given input data files (50 x 50 puzzle and a list of words in class web page). And measure the actual running times of your program.
Each direction running time is O(n ^3). Therefore the total running time is (O(n^3) * 8) because there are 8 total directions.