Skip to content

Commit 613af8d

Browse files
committed
Adding timings to README.md
1 parent 9a881cd commit 613af8d

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

README.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,30 @@ This repository contains my solutions for the [Advent of Code 2024](https://adve
1212
The project is structured as follows:
1313

1414
* `src/main/kotlin` contains the main code for the solutions
15-
* `src/test/kotlin` contains the tests used to run the solutions
15+
* `src/test/kotlin` contains the JUnit 5 tests used to run the solutions
1616
* `src/test/resources` contains the input files for each puzzle (including examples)
1717

1818
## Solutions
1919

20-
* [Day 1: Historian Hysteria](src/test/kotlin/adventofcode/Day01Test.kt)
21-
* [Day 2: Red-Nosed Reports](src/test/kotlin/adventofcode/Day02Test.kt)
22-
* [Day 3: Mull It Over](src/test/kotlin/adventofcode/Day03Test.kt)
23-
* [Day 4: Ceres Search](src/test/kotlin/adventofcode/Day04Test.kt)
24-
* [Day 5: Print Queue](src/test/kotlin/adventofcode/Day05Test.kt)
25-
* [Day 6: Guard Gallivant](src/test/kotlin/adventofcode/Day06Test.kt)
26-
* [Day 7: Bridge Repair](src/test/kotlin/adventofcode/Day07Test.kt)
27-
* [Day 8: Resonant Collinearity](src/test/kotlin/adventofcode/Day08Test.kt)
28-
* [Day 9: Disk Fragmenter](src/test/kotlin/adventofcode/Day09Test.kt)
29-
* [Day 10: Hoof It](src/test/kotlin/adventofcode/Day10Test.kt)
30-
* [Day 11: Plutonian Pebbles](src/test/kotlin/adventofcode/Day11Test.kt)
31-
* [Day 12: Garden Groups](src/test/kotlin/adventofcode/Day12Test.kt)
32-
* [Day 13: Claw Contraption](src/test/kotlin/adventofcode/Day13Test.kt)
33-
* [Day 14: Restroom Redoubt](src/test/kotlin/adventofcode/Day14Test.kt)
34-
* [Day 15: Warehouse Woes](src/test/kotlin/adventofcode/Day15Test.kt)
35-
* [Day 16: Reindeer Maze](src/test/kotlin/adventofcode/Day16Test.kt)
36-
* [Day 17: Chronospatial Computer](src/test/kotlin/adventofcode/Day17Test.kt)
37-
* [Day 18: RAM Run](src/test/kotlin/adventofcode/Day18Test.kt)
38-
* [Day 19: Linen Layout](src/test/kotlin/adventofcode/Day19Test.kt)
20+
Here are the solutions I have implemented along with the time it took to run each one:
21+
22+
* [Day 1: Historian Hysteria](src/test/kotlin/adventofcode/Day01Test.kt) (49 ms)
23+
* [Day 2: Red-Nosed Reports](src/test/kotlin/adventofcode/Day02Test.kt) (45 ms)
24+
* [Day 3: Mull It Over](src/test/kotlin/adventofcode/Day03Test.kt) (39 ms)
25+
* [Day 4: Ceres Search](src/test/kotlin/adventofcode/Day04Test.kt) (120 ms)
26+
* [Day 5: Print Queue](src/test/kotlin/adventofcode/Day05Test.kt) (50 ms)
27+
* [Day 6: Guard Gallivant](src/test/kotlin/adventofcode/Day06Test.kt) (6,359 ms)
28+
* [Day 7: Bridge Repair](src/test/kotlin/adventofcode/Day07Test.kt) (69 ms)
29+
* [Day 8: Resonant Collinearity](src/test/kotlin/adventofcode/Day08Test.kt) (77 ms)
30+
* [Day 9: Disk Fragmenter](src/test/kotlin/adventofcode/Day09Test.kt) (1,012 ms)
31+
* [Day 10: Hoof It](src/test/kotlin/adventofcode/Day10Test.kt) (583 ms)
32+
* [Day 11: Plutonian Pebbles](src/test/kotlin/adventofcode/Day11Test.kt) (119 ms)
33+
* [Day 12: Garden Groups](src/test/kotlin/adventofcode/Day12Test.kt) (221 ms)
34+
* [Day 13: Claw Contraption](src/test/kotlin/adventofcode/Day13Test.kt) (54 ms)
35+
* [Day 14: Restroom Redoubt](src/test/kotlin/adventofcode/Day14Test.kt) (474 ms)
36+
* [Day 15: Warehouse Woes](src/test/kotlin/adventofcode/Day15Test.kt) (129 ms)
37+
* [Day 16: Reindeer Maze](src/test/kotlin/adventofcode/Day16Test.kt) (261 ms)
38+
* [Day 17: Chronospatial Computer](src/test/kotlin/adventofcode/Day17Test.kt) (93 ms)
39+
* [Day 18: RAM Run](src/test/kotlin/adventofcode/Day18Test.kt) (5,520 ms)
40+
* [Day 19: Linen Layout](src/test/kotlin/adventofcode/Day19Test.kt) (60 ms)
3941
* [Day 20: Race Condition](src/test/kotlin/adventofcode/Day20Test.kt)

src/main/kotlin/adventofcode/day14/RestroomRedoubt.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,8 @@ fun String.findTree(): Int {
101101
val maxX = robots.maxOf { it.ray.origin.x } + 1
102102
val maxY = robots.maxOf { it.ray.origin.y } + 1
103103
val sequences = robots.map { it.points(maxX, maxY) }
104-
105104
val minEntropyT = (1..lcmInt(maxX, maxY)).minBy { t ->
106105
sequences.map { it.next() }.calculateShannonEntropy(maxX, maxY, GRID_WIDTH, GRID_HEIGHT)
107106
}
108-
robots.map { it.move(minEntropyT, maxX, maxY) }.toSet().printGrid(maxX, maxY)
109107
return minEntropyT
110108
}

0 commit comments

Comments
 (0)