Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
tiles = [7 12 8 6 9];
nRows = 2;
nCols = 2;
omit = 6;
board = fill_board(tiles,nRows,nCols);
tiles_used = tiles(board(:));
assert(isequal(setdiff(tiles,tiles_used),omit))
B =
6 7 8 9 12
IX =
4 1 3 5 2
|
2 | Pass |
%%
tiles = [12 6 1 20 18 7 4 17];
nRows = 3;
nCols = 2;
omit = [1 4];
board = fill_board(tiles,nRows,nCols);
tiles_used = tiles(board(:));
assert(isequal(setdiff(tiles,tiles_used),omit))
B =
1 4 6 7 12 17 18 20
IX =
3 7 2 6 1 8 5 4
|
3 | Pass |
%%
tiles = [2 10 25 38 39 5 24 14 4];
nRows = 2;
nCols = 3;
omit = [2 4 5];
board = fill_board(tiles,nRows,nCols);
tiles_used = tiles(board(:));
assert(isequal(setdiff(tiles,tiles_used),omit))
B =
2 4 5 10 14 24 25 38 39
IX =
1 9 6 2 8 7 3 4 5
|
3968 Solvers
Vectorize the digits of an Integer
269 Solvers
Duplicate each element of a vector.
518 Solvers
Find nearest prime number less than input number
269 Solvers
262 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!