Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
T = [1 2 4;...
2 3 4;...
5 6 8;...
6 7 8;...
1 2 5;...
2 5 6;...
2 3 6;...
3 6 7;...
3 4 7;...
4 7 8;...
4 1 8;...
1 8 5];
i = 3;
L = [2 4 6 7];
assert(isequal(sort(query_vertex_neighbors(T,i),2),L))
|
2 | Pass |
T = [1 2 3;...
1 3 4;...
1 4 5;...
1 5 2;...
6 3 2;...
6 4 3;...
6 5 4;...
6 2 5];
i = 5;
L = [1 2 4 6];
assert(isequal(sort(query_vertex_neighbors(T,i),2),L))
|
3 | Pass |
T = [2 3 5;...
3 5 7;...
5 7 11;...
7 11 13];
i = 6;
assert(isempty(query_vertex_neighbors(T,i)))
|
Replace NaNs with the number that appears to its left in the row.
2018 Solvers
131 Solvers
96 Solvers
Return unique values without sorting
588 Solvers
How many trades represent all the profit?
520 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!