Home

Awesome

AdventOfCode2024

Build Status

<!-- [![CI](https://github.com/goggle/AdventOfCode2024.jl/workflows/CI/badge.svg)](https://github.com/goggle/AdventOfCode2024.jl/actions?query=workflow%3ACI+branch%3Amain) --> <!-- [![Code coverage](https://codecov.io/gh/goggle/AdventOfCode2024.jl/branch/main/graphs/badge.svg?branch=main)](https://codecov.io/github/goggle/AdventOfCode2024.jl?branch=main) -->

This Julia package contains my solutions for Advent of Code 2024.

Overview

DayProblemTimeAllocated memorySource
1:white_check_mark:482.120 μs584.44 KiB:white_check_mark:
2:white_check_mark:2.070 ms3.64 MiB:white_check_mark:
3:white_check_mark:470.249 μs376.73 KiB:white_check_mark:
4:white_check_mark:1.798 ms3.06 MiB:white_check_mark:
5:white_check_mark:2.057 ms1.26 MiB:white_check_mark:
6:white_check_mark:22.057 s7.71 GiB:white_check_mark:
7:white_check_mark:218.393 ms212.72 MiB:white_check_mark:
8:white_check_mark:316.122 μs671.41 KiB:white_check_mark:
9:white_check_mark:1.099 s6.49 GiB:white_check_mark:
10:white_check_mark:578.868 μs633.67 KiB:white_check_mark:
11:white_check_mark:16.464 ms13.70 MiB:white_check_mark:
12:white_check_mark:12.506 ms10.00 MiB:white_check_mark:
13:white_check_mark:3.423 ms1.15 MiB:white_check_mark:
14:white_check_mark:75.842 ms275.06 KiB:white_check_mark:
16:white_check_mark:TBD105.84 MiB:white_check_mark:
17:white_check_mark:TBD706.30 KiB:white_check_mark:
18:white_check_mark:TBD5.64 MiB:white_check_mark:
19:white_check_mark:TBD3.41 MiB:white_check_mark:
20:white_check_mark:TBD224.97 MiB:white_check_mark:
<!-- | 21 | [:white_check_mark:](https://adventofcode.com/2024/day/21) | 9.675 ms | 7.19 MiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day21.jl) | --> <!-- | 22 | [:white_check_mark:](https://adventofcode.com/2024/day/22) | 790.712 ms | 631.26 MiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day22.jl) | --> <!-- | 23 | [:white_check_mark:](https://adventofcode.com/2024/day/23) | 2.979 s | 9.69 MiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day23.jl) | --> <!-- | 24 | [:white_check_mark:](https://adventofcode.com/2024/day/24) | 43.214 ms | 49.77 MiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day24.jl) | --> <!-- | 25 | [:white_check_mark:](https://adventofcode.com/2024/day/25) | 69.476 ms | 62.03 MiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day25.jl) | --> <!-- | 15 | [:white_check_mark:](https://adventofcode.com/2024/day/15) | 2.647 ms | 1.49 MiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day15.jl) | -->

The benchmarks have been measured on this machine:

Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
  Threads: 1 on 8 virtual cores

Installation and Usage

Make sure you have Julia 1.8 or newer installed on your system.

Installation

Start Julia and enter the package REPL by typing ]. Create a new environment:

(@v1.8) pkg> activate aoc

Install AdventOfCode2024.jl:

(aoc) pkg> add https://github.com/goggle/AdventOfCode2024.jl

Go back to the Julia REPL by pushing the backspace key.

Usage

First, activate the package:

julia> using AdventOfCode2024

Each puzzle can now be run with dayXY():

julia> day01()
2-element Vector{Int64}:
 1590491
 22588371

This will use my personal input. If you want to use another input, provide it to the dayXY method as a string. You can also use the readInput method to read your input from a text file:

julia> input = readInput("/path/to/input.txt")

julia> AdventOfCode2024.Day01.day01(input)
2-element Vector{Int64}:
 1590491
 22588371