Problem 2479. Mongean Shuffle
A Mongean shuffle of an n card deck starts with putting the initial deck on the left hand side.
- The top card of the deck is taken and put on the right hand side.
- The second card from the deck on left is taken and put on top of right deck.
- The third card is taken from the left and and put at the bottom of the right deck.
- The fourth card is put on top of right deck.
- The fifth card is put at the bottom of right deck.
This process is continued until all the cards on left are transferred to the right.
The initial state of the cards will be given. Return the state after this shuffle.
Solution Stats
Problem Comments
-
2 Comments
Jean-Marie Sainthillier
on 4 Aug 2014
See video on Youtube
http://www.youtube.com/watch?v=dVOJMiyVpWA
Jean-Marie Sainthillier
on 16 Aug 2014
If even cards from the deck on left are taken and put on top of right deck, you inverse the correct order. No ?
Solution Comments
Show commentsGroup

Strings II
- 21 Problems
- 41 Finishers
- Eliminate Polysyllabics: Long live short words!
- Alternately upper-lower case
- Morse Code Generator! Try it!
- Is the paranthesis sequence balanced ?
- Simple Decoder Ring
- Join Strings with Multiple Different Delimiters
- Is the paranthesis sequence balanced ?
- Count letters occurence in text, specific to words with a given length.
- Convert Two Character String into a Binary Vector
- Kryptos - CIA Cypher Sculpture: Vigenere Encryption
- Kryptos - CIA Cypher Sculpture: Vignere Decryption
- Mean and standard deviation of times in string
- How many digits are there?
- ABBREVIATION
- Make a list string
- Generate a melodic contour string matrix
- Morse Code Generator! Try it!
- NO _________ ALLOWED....
- Backslang, odds are you used it at some point in time...
- Simple Caesar Cypher - shift encrypt a message given an index number
- Split a given string from the first instance of a given character
- Concatenate strings
- most frequent character
- Alternately upper-lower case
Problem Recent Solvers87
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!