Moved algorithms implementations to puzzles.