Solutions to random programming puzzles