File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ This Julia package contains my solutions for [Advent of Code 2024](https://adven
1414| 2 | [ :white_check_mark : ] ( https://adventofcode.com/2024/day/2 ) | 2.070 ms | 3.64 MiB | [ :white_check_mark : ] ( https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day02.jl ) |
1515| 3 | [ :white_check_mark : ] ( https://adventofcode.com/2024/day/3 ) | 470.249 μs | 376.73 KiB | [ :white_check_mark : ] ( https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day03.jl ) |
1616| 4 | [ :white_check_mark : ] ( https://adventofcode.com/2024/day/4 ) | 1.798 ms | 3.06 MiB | [ :white_check_mark : ] ( https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day04.jl ) |
17- | 5 | [ :white_check_mark : ] ( https://adventofcode.com/2024/day/5 ) | 2.057 ms | 1.26 MiB | [ :white_check_mark : ] ( https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day05.jl ) |
17+ | 5 | [ :white_check_mark : ] ( https://adventofcode.com/2024/day/5 ) | 2.104 ms | 1.26 MiB | [ :white_check_mark : ] ( https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day05.jl ) |
1818| 6 | [ :white_check_mark : ] ( https://adventofcode.com/2024/day/6 ) | 592.911 ms | 52.99 MiB | [ :white_check_mark : ] ( https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day06.jl ) |
1919| 7 | [ :white_check_mark : ] ( https://adventofcode.com/2024/day/7 ) | 218.393 ms | 212.72 MiB | [ :white_check_mark : ] ( https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day07.jl ) |
2020| 8 | [ :white_check_mark : ] ( https://adventofcode.com/2024/day/8 ) | 316.122 μs | 671.41 KiB | [ :white_check_mark : ] ( https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day08.jl ) |
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ function parse_input(input)
2323 return rules, numbers
2424end
2525
26- function solve (rules, numbers)
26+ function solve (rules:: Dict{Int,Vector{Int}} , numbers:: Vector{Vector{Int}} )
2727 p1, p2 = 0 , 0
2828 for nvec ∈ numbers
2929 if valid (rules, nvec)
@@ -35,7 +35,7 @@ function solve(rules, numbers)
3535 return [p1, p2]
3636end
3737
38- function valid (rules, numbers)
38+ function valid (rules:: Dict{Int,Vector{Int}} , numbers:: Vector{Int} )
3939 for i ∈ eachindex (numbers)
4040 for j ∈ 1 : i- 1
4141 haskey (rules, numbers[i]) && numbers[j] ∈ rules[numbers[i]] && return false
@@ -44,7 +44,7 @@ function valid(rules, numbers)
4444 return true
4545end
4646
47- function correct (rules, numbers)
47+ function correct (rules:: Dict{Int,Vector{Int}} , numbers:: Vector{Int} )
4848 cont = true
4949 while cont
5050 cont = false
You can’t perform that action at this time.
0 commit comments