in case number 3 and 4 total number of element is also less than your correct fullest row output
How does this thing is possible
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
a = [ ...
1 2 0 0 0
0 0 5 0 0
2 7 0 0 0
0 6 9 3 3];
r_correct = 4;
assert(isequal(fullest_row(a),r_correct))
r =
4
|
2 | Pass |
a = [ ...
1 2 0 0
0 0 5 0
0 6 9 -3
2 7 0 0
0 0 0 0];
r_correct = 3;
assert(isequal(fullest_row(a),r_correct))
r =
3
|
3 | Fail |
a = [ ...
1 0 0
0 0 0
0 0 0
0 0 0
0 2 3];
r_correct = 5;
assert(isequal(fullest_row(a),r_correct))
r =
2
|
4 | Fail |
a = [ ...
0
0
0
-3
0
0];
r_correct = 4;
assert(isequal(fullest_row(a),r_correct))
r =
1
|
874 Solvers
Back to basics 22 - Rotate a matrix
763 Solvers
Number of digits in an integer
336 Solvers
238 Solvers
376 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!