Santa has problems. One of them is how to fill all those stockings hung with care in the middle of the night without waking up the sleeping tykes. There’s enough work to be done deploying the full-size presents. How can we make this Christmas tradition less trying?

Inspired by my friend Brian Christian’s writing and my extended family’s efforts to stuff Christmas stockings without their children noticing, I regifted a computer science algorithm for the Yuletide. If parents were to buy two sets of Christmas stockings and hang one set, empty, above the fireplace, they could fill the second set at their leisure. Then on Christmas Eve, they only have to swap the two sets. Easy.

Stockings