Cody

# Problem 43569. Avengers Assemble!

Solution 1740609

Submitted on 2 Mar 2019 by Martin C.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
x = [0 0 0 0 0; 0 2 0 4 0; 0 0 0 0 0; 0 1 0 3 0] output = [2 4; 1 3]; assert(isequal(avengersAssemble(x),output))

x = 0 0 0 0 0 0 2 0 4 0 0 0 0 0 0 0 1 0 3 0 s = 4 5 x = 0 0 0 0 0 2 0 1 0 0 0 0 0 4 0 3 0 0 0 0 x = 2 1 4 3 le = 4 y = 2 4 1 3

2   Pass
x = [0 0 0 0 0 0 0; 0 2 0 4 0 6 0; 0 0 0 0 0 0 0; 0 1 0 3 0 5 0; 0 0 0 0 0 0 0; 0 7 0 8 0 9 0; 0 0 0 0 0 0 0;] output = [2 4 6; 1 3 5; 7 8 9]; assert(isequal(avengersAssemble(x),output))

x = 0 0 0 0 0 0 0 0 2 0 4 0 6 0 0 0 0 0 0 0 0 0 1 0 3 0 5 0 0 0 0 0 0 0 0 0 7 0 8 0 9 0 0 0 0 0 0 0 0 s = 7 7 x = 0 0 0 0 0 0 0 0 2 0 1 0 7 0 0 0 0 0 0 0 0 0 4 0 3 0 8 0 0 0 0 0 0 0 0 0 6 0 5 0 9 0 0 0 0 0 0 0 0 x = 2 1 7 4 3 8 6 5 9 le = 9 y = 2 4 6 1 3 5 7 8 9

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!