Solutions for different programming puzzles