Skip to content

svoychik/adventofcode2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build and Run Java Files

Advent of Code 2024 🎄✨

Welcome to my Advent of Code 2024 solutions repository!

This repository contains my solutions for the Advent of Code 2024 challenges, written entirely in Java. Each day’s challenge is implemented as a separate class (sometimes part 2 is implemented as a separate class as well), with input files organized in the resources folder.


📂 Project Structure

Folders and Files

  • src/
    • Java Code: Each day’s solution is implemented in a separate Java file, named as DayX.java (e.g., Day1.java, Day10.java).
    • Optimized or Extended Solutions: For some days, additional files like Day11Optimized.java or Day13Pt2.java provide alternative or part 2 implementations.
  • src/resources/
    • Input Files: Inputs for each day’s challenge are stored here.
      • File naming format: dayX.txt (e.g., day1.txt, day15.txt).

Example

For Day 11, the structure includes:

  • Solution Files:
    • Day11.java (initial solution)
    • Day11Optimized.java (optimized solution)
  • Input File:
    • src/resources/day11.txt

Build job

Build and Run Java Files

The build-run job is configured to solve daily tasks with the provided default input

🚀 How to Run Locally

1. Clone the Repository

git clone https://github.com/svoychik/adventofcode2024.git
cd adventofcode2024

2. Set Up Your Environment

  • Open the project in your preferred Java IDE

3. Run a Specific Day’s Solution

  • Navigate to the corresponding Java file (e.g., Day10.java).
  • Ensure the input file (e.g., day10.txt) exists in the resources folder.
  • Execute the main method of the Java file to see the result

About

Advent of code 2024 solutions in java

Topics

Resources

Stars

Watchers

Forks