7 kyu
Check contained matrix
130 of 296sorts
Description:
Implement a module that takes as an input two matrices of integer numbers. Both matrices are already filled with integer numbers. The first matrix has a size MxN (M>=3, N>=3) and the second one has a size of 3x3 (rows x columns).
The module must check if the second matrix is contained in the first matrix. If that check succeeds, it must store (not display) the coordinates of the first matrix where the second matrix starts (upper left corner). For example, given the two following matrices, the module will store (1, 1), row 1, column 1. If the second matrix is not contained in the first one, the module will store -1 -1. The module will store the coordinates of the first match it finds.
MATRIX A MATRIX B
| 4 1 3 8 | | 1 3 3 |
| 2 1 3 3 | , | 2 3 1 | --> row = 1, column = 1
| 0 2 3 1 | | 3 1 1 |
| 1 3 1 1 |
Matrix
Fundamentals
Similar Kata:
Stats:
Created | Dec 29, 2017 |
Published | Dec 29, 2017 |
Warriors Trained | 777 |
Total Skips | 48 |
Total Code Submissions | 860 |
Total Times Completed | 296 |
C++ Completions | 130 |
Java Completions | 170 |
Total Stars | 13 |
% of votes with a positive feedback rating | 86% of 104 |
Total "Very Satisfied" Votes | 79 |
Total "Somewhat Satisfied" Votes | 20 |
Total "Not Satisfied" Votes | 5 |
Total Rank Assessments | 4 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |