Cody

Solution 1332518

Submitted on 9 Nov 2017 by yurenchu
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
deck = 1:28; n = 10; out = [3 22 9 4 23 7 25 16 14 14]; assert(isequal(solitaire(deck, n),out))

jpos4 = 2 28 jpos4 = 26 28 jpos4 = 3 6 jpos4 = 23 27 jpos4 = 6 28 jpos4 = 18 24 jpos4 = 3 10 jpos4 = 3 22 jpos4 = 13 22 jpos4 = 2 12

2   Pass
deck = 1:28; n = 9; out = [3 22 9 4 23 7 25 16 14]; assert(isequal(solitaire(deck, n),out))

jpos4 = 2 28 jpos4 = 26 28 jpos4 = 3 6 jpos4 = 23 27 jpos4 = 6 28 jpos4 = 18 24 jpos4 = 3 10 jpos4 = 3 22 jpos4 = 13 22