3 ms·
Start with the deck in standard order. Before each step, number the remaining cards from 0 to N. Each card encodes a digit in a mixed radix number: a0 + 52(a1
by rerdavies 3y ago
Start with the deck in standard order. Before each step, number the remaining cards from 0 to N. Each card encodes a digit in a mixed radix number:
a0 + 52(a1 + 51(a2+ 50*(a3 + ...)))