1. You will be given a grid as 2d array
2. You need to return count of all 3x3 magic squares present in the given grid
3. Input and output is handled for you
4. It is a functional problem ,please do not modify main()
Input Format
Input is handled for you.
Output Format
output handled
Constraints
1 <= grid.length <= 10 1 <= grid[0].length <= 10 0 <= grid[i][j] <= 15
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
4 4 7 8 1 6 2 3 5 7 3 4 9 2 1 6 4 5
Output
1