Code for the two posts on optimally stacking a deck of cards.