Created
June 22, 2021 08:19
-
-
Save kcore/b19fe9741dd2ae8b4266ecb9d590a897 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Build a Rails API that accepts input which is a N x M matrix containing only 1 & 0 as elements, return a sub-matrix of maximum size with all 1s. | |
For example, consider the below matrix. | |
matrix = [ | |
[1, 0, 1, 1], | |
[0, 1, 0, 1], | |
[1, 1, 1, 0], | |
[1, 1, 1, 1] | |
] | |
The submatix with only 1's & maximum size is | |
[ | |
[1,1,1], | |
[1,1,1] | |
] | |
Expectations: | |
- Ensure that there is code documentation, test cases | |
- Please deploy the API on Heruko & share the endpoint | |
- Share the github repository URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment