Cody

Solution 1217194

Submitted on 21 Jun 2017 by arvid Martens
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))

out = 3 0 0 0 0 0 0 0 0 0 out = 3 22 0 0 0 0 0 0 0 0 out = 3 22 9 0 0 0 0 0 0 0 out = 3 22 9 4 0 0 0 0 0 0 out = 3 22 9 4 23 0 0 0 0 0 out = 3 22 9 4 23 7 0 0 0 0 out = 3 22 9 4 23 7 25 0 0 0 out = 3 22 9 4 23 7 25 16 0 0 out = 3 22 9 4 23 7 25 16 14 0 out = 3 22 9 4 23 7 25 16 14 14

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

out = 3 0 0 0 0 0 0 0 0 out = 3 22 0 0 0 0 0 0 0 out = 3 22 9 0 0 0 0 0 0 out = 3 22 9 4 0 0 0 0 0 out = 3 22 9 4 23 0 0 0 0 out = 3 22 9 4 23 7 0 0 0 out = 3 22 9 4 23 7 25 0 0 out = 3 22 9 4 23 7 25 16 0 out = 3 22 9 4 23 7 25 16 14