Skip to content

jackskelt/advent_of_code.ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code - Elixir

This repository contains my solutions for the Advent of Code challenges, implemented in Elixir.

The project structure and tooling are powered by the aoc package, which handles input fetching, file generation, and execution logic.

4 ⭐

📂 Project Structure

Because this project uses the aoc helper, the file organization is standardized:

1. Solutions (/lib/advent_of_code/solutions)

The actual logic for each day resides here.

  • Location: lib/advent_of_code/solutions/yYY/dayXX.ex
  • Structure: Each file usually contains a part1/1 and part2/1 function where you write your solution code.

2. Tests (/test)

This is where example cases provided in the puzzle description are validated.

  • Location: test/YYYY/dayXX_test.exs

  • How to modify: Open the corresponding test file to add the example inputs provided by the puzzle description.

    # Example inside test/advent_of_code/2025/day_01_test.exs
    test "part one example" do
      input = ~S"""
      L68
      L30
      R48
      L5
      R60
      L55
      L1
      L99
      R14
      L82
      """
    
      assert 3 == solve(input, :part_one)
    end
    
      @part_one_solution 1145
    
    test "part one solution" do
      assert {:ok, @part_one_solution} == AoC.run(2025, 1, :part_one)
    end

About

Advent of Code in Elixir

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages