Given two square matrices Grid1 and Grid2 with the same dimensions(NxN).Check whether they are identical or not.
Both the matrices are identical,
so the answer is 1.
Both the matrices are not identical,
So, answer is 0.
You don't need to read input or print anything.Your task is to complete the function areMatricesIdentical() which takes the integer N and two 2D arrays Grid1 and Grid2 as input parameters and returns 1 if the matrices are identical.Otherwise,it returns 0.
Expected Time Complexity:O(N2) Expected Auxillary Space:O(1)