redmage1993 / deckshufflingproblem Goto Github PK
View Code? Open in Web Editor NEWC solution to a mathematical problem where you must "count" the number of applications of a complex shuffling algorithm it takes to restore a deck of cards of size N back to its original order. A brute force algorithm results in poor turnaround times for some N, as it can take a an incredible number of applications to restore the order.