Cody

Solution 1701505

Submitted on 2 Jan 2019 by A C
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; m = 10; out = [3 22 9 4 23 7 25 16 14 14]; assert(isequal(solitaire(deck, m),out))

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

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

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

3   Pass
deck = 1:5; m = 10; out = [3 4 1 1 5 5 4 2 4 1]; assert(isequal(solitaire(deck, m),out))

out = 3 out = 3 4 out = 3 4 1 out = 3 4 1 1 out = 3 4 1 1 5 out = 3 4 1 1 5 5 out = 3 4 1 1 5 5 4 out = 3 4 1 1 5 5 4 2 out = 3 4 1 1 5 5 4 2 4 out = 3 4 1 1 5 5 4 2 4 1