Company: Flipkart_13july
Difficulty: medium
Count Word Occurrences in Grid Problem Description Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings anywhere in the program, as these contribute to the standard output and testcases will fail. Input Format: The first line of input has N, which is the number of rows/columns in the grid. The next N lines each contain N-characters (alphabets or digits). The last line contains the word whose number of occurrences has to be found out. Output Format: The output has the number of occurrences of the given word in the grid. Examples Example 1: Input: 3 ctt cct cat cat Output: 4 Explanation: Size of the grid, N = 3. The grid along with occurrences of the word given in input is marked in the figure given below. We can see that the word 'cat' is present 4 times. Hence the output is 4. Example 2: Input: 5 Jampu spmuJ Rmjus jumpsp ujpsM jump Output: 2 Explanation: Size of the grid, N = 5. The grid along with occurrences of the word given in input is marked in