This compelled me to take my copy of "Programming Pearls" (by Jon Bentley, 2000, 2nd ed.) from the bookshelf.
Another one that has spent time on my night table is "The Turing Omnibus: 61 excursions in computer science" by A.K. Dewdney. Varied, clever problems in dazzlingly plain language.