Cody

# Problem 43594. Find Adjacency Matrix

Solution 2039773

Submitted on 30 Nov 2019 by Athi
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
s = [1 1 2 2 3 3 4 5 5 6 7 8]; t = [2 4 4 8 4 6 8 6 8 7 8 8]; y_correct = [0 1 0 1 0 0 0 0 ; 1 0 0 1 0 0 0 1 ; 0 0 0 1 0 1 0 0 ; 1 1 1 0 0 0 0 1 ; 0 0 0 0 0 1 0 1 ; 0 0 1 0 1 0 1 0 ; 0 0 0 0 0 1 0 1 ; 0 1 0 1 1 0 1 1] assert(isequal(getMatrix(s,t),y_correct))

y_correct = 0 1 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 1

2   Pass
s = [1 ]; t = [8 ]; y_correct = [ 0 0 0 0 0 0 0 1; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 1 0 0 0 0 0 0 0 ] assert(isequal(getMatrix(s,t),y_correct))

y_correct = 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0