Cody

Solution 1454545

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

1 4 7 10 13 16 19 22 25 28 3 6 9 12 15 18 21 24 2 27 5 8 11 14 17 20 23 26 1 4 7 10 13 16 19 22 25 3 6 28 9 12 15 18 21 24 2 27 5 8 11 14 17 20 23 26 newArray = 5 4 7 10 13 16 19 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 7 10 13 16 19 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 11 10 13 16 19 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 11 14 13 16 19 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 11 14 17 16 19 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 11 14 17 20 19 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 11 14 17 20 23 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 11 14 17 20 23 26 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 5 8 11 14 17 20 23 26 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26

Assertion failed.

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

1 4 7 10 13 16 19 22 25 28 3 6 9 12 15 18 21 24 2 27 5 8 11 14 17 20 23 26 1 4 7 10 13 16 19 22 25 3 6 28 9 12 15 18 21 24 2 27 5 8 11 14 17 20 23 26 newArray = 5 4 7 10 13 16 19 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 7 10 13 16 19 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 11 10 13 16 19 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 11 14 13 16 19 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 11 14 17 16 19 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 11 14 17 20 19 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 11 14 17 20 23 22 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 newArray = 5 8 11 14 17 20 23 26 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26 5 8 11 14 17 20 23 26 28 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26

Assertion failed.