Cody

# Problem 766. Implement Solitaire cipher for N long deck.

Solution 1715294

Submitted on 25 Jan 2019 by Valentin Noël-Youïnou
• Size: 10
• This is the leading solution.
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))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In solitaire (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 5)]

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

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In solitaire (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 7)]

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

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In solitaire (line 2) In ScoringEngineTestPoint3 (line 4) In solutionTest (line 9)]