Cody

# Problem 45261. Query every vertices neighbor indices

Solution 2087619

Submitted on 10 Jan 2020 by Nicolas Douillet
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
T = [1, 2, 3; 1, 3, 4; 1, 4, 5; 1, 2, 5; 2, 3, 6; 3, 4, 6; 4, 5, 6; 2, 5, 6; 2, 3, 4; 2, 4, 5; 1, 2, 4; 2, 4, 6]; N = cell(6,1); N(1,1) = {[2, 3, 4, 5]}; N(2,1) = {[1, 3, 4, 5, 6]}; N(3,1) = {[1, 2, 4, 6]}; N(4,1) = {[1, 2, 3, 5, 6]}; N(5,1) = {[1, 2, 4, 6]}; N(6,1) = {[2, 3, 4, 5]}; assert(isequal(query_every_vertices_neighbor_indices(T),N))

2   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; 1, 4, 8; 1, 5, 8]; N = cell(8,1); N(1,1) = {[2, 4, 5, 8]}; N(2,1) = {[1, 3, 4, 5, 6]}; N(3,1) = {[2, 4, 6, 7]}; N(4,1) = {[1, 2, 3, 7, 8]}; N(5,1) = {[1, 2, 6, 8]}; N(6,1) = {[2, 3, 5, 7, 8]}; N(7,1) = {[3, 4, 6, 8]}; N(8,1) = {[1 4 5 6 7]}; assert(isequal(query_every_vertices_neighbor_indices(T),N))

### Community Treasure Hunt

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

Start Hunting!