Cody

Solution 3048148

Submitted on 3 Oct 2020
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   Fail

n = 1 pat = 1×3 string array "13" "19" "29"

Assertion failed.

2   Fail

n = 2

Error using graph/validateNodeID (line 550) Graph does not contain a node named '269'. Error in graph/shortestpath (line 60) targ = validateNodeID(G, t); Error in prime_ladder (line 23) pat = shortestpath(g,string(p1),string(p2)) Error in Test2 (line 3) ladder = prime_ladder(p1,p2);

3   Fail

n = 2

Error using graph/validateNodeID (line 550) Graph does not contain a node named '397'. Error in graph/shortestpath (line 60) targ = validateNodeID(G, t); Error in prime_ladder (line 23) pat = shortestpath(g,string(p1),string(p2)) Error in Test3 (line 3) ladder = prime_ladder(p1,p2);

4   Fail

n = 2

Matrix dimensions must agree. Error in prime_ladder (line 16) if sum(s1==s2)==n Error in Test4 (line 3) ladder = prime_ladder(p1,p2);

5   Fail

n = 2

Error using graph/validateNodeID (line 550) Graph does not contain a node named '271'. Error in graph/shortestpath (line 55) src = validateNodeID(G, s); Error in prime_ladder (line 23) pat = shortestpath(g,string(p1),string(p2)) Error in Test5 (line 3) ladder = prime_ladder(p1,p2);

6   Fail

n = 2 pat = 1×6 string array "877" "827" "829" "839" "739" "733"

Assertion failed.

7   Fail

n = 3 pat = 1×7 string array "2267" "2207" "2203" "2003" "2053" "2153" "1153"

Assertion failed.

### Community Treasure Hunt

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

Start Hunting!