Cody

# Problem 753. Solitaire Cipher

Solution 716451

Submitted on 18 Aug 2015 by Björn Skatt
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 = 8 out = 8 26 out = 8 26 1 out = 8 26 1 4 out = 8 26 1 4 7 out = 8 26 1 4 7 23 out = 8 26 1 4 7 23 8 out = 8 26 1 4 7 23 8 8 out = 8 26 1 4 7 23 8 8 4 out = 8 26 1 4 7 23 8 8 4 24 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; n = 9; out = [3 22 9 4 23 7 25 16 14]; assert(isequal(solitaire(deck, n),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