We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The real difficulty of this problem is realizing that you can change the value of any cell of the first quarter submatrix for any of the other 3 options available without affecting any other value of the first quarter submatrix.
This can be achieved with a flipping sequence like this:
The other 2 candidate cells can be moved to the first quarter submatrix using the same sequence as above after using this second sequence:
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Flipping the Matrix
You are viewing a single comment's thread. Return to all comments →
The real difficulty of this problem is realizing that you can change the value of any cell of the first quarter submatrix for any of the other 3 options available without affecting any other value of the first quarter submatrix.
This can be achieved with a flipping sequence like this:
The other 2 candidate cells can be moved to the first quarter submatrix using the same sequence as above after using this second sequence: