You are given a matrix of size N*N. You have to take another matrix of size N*N from which First you have to subtract the minimum value of each row from all the elements of the particular row and so on
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
Note: Before going to solution please try it by yourself.
Short description of solution approach
In this problem, whatever is talked about the second matrix from which you have to obtain the given matrix is just to puzzle you.
If you run behind the second matrix so there is a maximum probability that you are not going to get the correct answer for all input.
What you have to check is:
If these two conditions satisfy the matrix then your answer is YES otherwise NO.
Because the minimum value we can assume is 0. Now, if we subtract 0 from each row and each column of the matrix then we will be always getting the given matrix.
C++ implementation:
![find-the-magic-matrix - output](https://www.includehelp.com/icp/Images/find-the-magic-matrix-output.jpg)
need an explanation for this answer? contact us directly to get an explanation for this answer