| ▲ | steve_taylor an hour ago | |
I'd start by identifying all the known boundaries: 52 cards, so each card can be represented by a byte. Cards are arranged into 4 stacks of up to 13 cards each, 7 columns of up to 13 cards each, and a pile of up to 24 remaining cards. (You don't need two piles of remaining cards.) That's 167 (4 * 13 + 7 * 13 + 24) bytes for the cards, 12 bytes to store lengths, and 1 byte to store the current index in the pile of remaining cards. It's a fixed number of fixed-length byte arrays and a fixed number of bytes to track lengths and one index. | ||