Problem 766. Implement Solitaire cipher for N long deck.
I'm not sure what algorithm we're supposed to implement here, but it does not appear to be the key generation for Schneier's Solitaire cipher.
For instance, when the initial deck is 1:N for some N > 4, it will be [2:N 1] after the jokers are moved and the two cuts performed, so the first key generated will then always be 4. In the test suite, it's 3.
Also, the last test in the test suite shows that in the algorithm asked for here, the jokers are kept in the keystream, which is not the case in Schneier's original algorithm.
It would be nice if you could update the problem's description with some additional details.
Solution CommentsShow comments
Problem Recent Solvers17
Wind outward from the center ...
middleAsColumn: Return all but first and last element as a column vector
More from this Author51
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!