Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
deck = [1 4 7 10 13 16 19 22 25 28 3 6 9 12 15 18 21 24 27 2 5 8 11 14 17 20 23 26];
n = 10;
out = [8 26 1 4 7 23 8 8 4 24];
assert(isequal(solitaire(deck, n),out))
out =
0 0 0 0 0 0 0 0 0 0
c =
10
c =
3
c =
5
c =
25
c =
10
c =
12
c =
21
c =
9
c =
8
c =
22
|
2 | Pass |
%%
deck = 1:28;
n = 10;
out = [3 22 9 4 23 7 25 16 14 14];
assert(isequal(solitaire(deck, n),out))
out =
0 0 0 0 0 0 0 0 0 0
c =
27
c =
26
c =
4
c =
25
c =
4
c =
22
c =
8
c =
1
c =
20
c =
10
|
3 | Pass |
%%
deck = 1:28;
n = 9;
out = [3 22 9 4 23 7 25 16 14];
assert(isequal(solitaire(deck, n),out))
out =
0 0 0 0 0 0 0 0 0
c =
27
c =
26
c =
4
c =
25
c =
4
c =
22
c =
8
c =
1
c =
20
|
Read a column of numbers and interpolate missing data
800 Solvers
553 Solvers
187 Solvers
145 Solvers
204 Solvers