Problem 51461. Pass the cards in Fitch Cheney's five-card trick

Cody Problem 51541 asked solvers to guess the card in Fitch Cheney's five-card trick. This problem is the counterpart: Write a function that takes five cards, selects four of them, and puts them in order to pass to the partner. See the previous problem for the rules. If the input string is '5C 7C 6S 4H 3D', the output string should be '5C 3D 6S 4H'. Some hands will have multiple possible answers. Your function needs only to provide one of them.
The motivation for this problem arose when EmilyR and I tried to dazzle JessicaR with card wizardry, and I misordered the four cards—twice.

Solution Stats

100.0% Correct | 0.0% Incorrect
Last Solution submitted on Jul 17, 2024

Solution Comments

Show comments

Problem Recent Solvers2

Suggested Problems

More from this Author281

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!