Welcome to the Advent of Code 2024 solution repository! This project showcases Haskell solutions to some of the exciting challenges from the Advent of Code.
The Advent of Code is an annual programming event where participants solve daily puzzles in December. This repository includes our solutions for:
- Day 1, Parts 1 and 2
- Day 2, Parts 1 and 2
- Day 4, Part 1
You can read more about the challenges on the official Advent of Code site:
We implemented these solutions using Haskell, embracing the language's elegant functional programming capabilities. Here's an overview:
- Day 1: Solutions involve reading inputs from text files and processing them using Haskell's standard libraries.
- Day 2: Advanced logic for validating and transforming sequences while adhering to constraints.
- Day 4: Tackling combinatorial problems with concise and efficient code.
Each solution is designed to be clear, maintainable, and efficient, demonstrating the expressive power of Haskell.
Want to try the solutions yourself? Here's how:
- Ensure you have GHC and Cabal installed.
- Clone this repository:
git clone https://github.com/yourusername/advent-of-code-haskell.git
- Navigate to the project directory:
cd advent-of-code-haskell
- Run the project for a specific challenge, such as Day 2 Part 2:
cabal run
Output for each challenge will be displayed in the terminal.
Here's an overview of the repository layout:
- src/: Contains the Haskell source files for each day's solution (e.g.,
Day01Part1.hs
,Day02Part2.hs
). - resources/inputs/: Includes input files (
day01.txt
,day02.txt
, etc.) used for solving the challenges. - test/: Placeholder for potential test files.
- Day4.cabal: Cabal configuration file for building and running the project.
- README.md: This file.
We welcome contributions! Found a bug or have a better solution? Feel free to:
- Open an issue
- Fork the repository
- Submit a pull request
Let’s work together to create a comprehensive and elegant collection of Haskell solutions! 🚀
This project is licensed under the MIT License. See the LICENSE file for more details.
Happy coding, and enjoy the journey through Advent of Code! If you're a Haskell enthusiast, we'd love to hear about your approaches to these challenges. Share your solutions, join the fun, and let's make this Advent of Code unforgettable! 🎅✨