Skip to content

Commit

Permalink
Update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
martapanc committed Dec 10, 2024
1 parent 255421c commit b0e0066
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
23 changes: 12 additions & 11 deletions 2024/src/2024/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# ❄️❄️❄️ Advent of Code 2024 ❄️❄️❄️

| Day | Title | Code | Tests | Tags | Difficulty | Visual |
|----------------------------------------------|-----------------------|------------------------|------------------------------|---------------------------------------------------|------------|--------|
| [Day 1](https://adventofcode.com/2024/day/1) | Historian Hysteria | [code](day01/day01.ts) | [tests](day01/day01.test.ts) | num list comparison, abs value | 🧊 | |
| [Day 2](https://adventofcode.com/2024/day/2) | Red-Nosed Reports | [code](day02/day02.ts) | [tests](day02/day02.test.ts) | increasing/decreasing num list, deltas | 🧊 | |
| [Day 3](https://adventofcode.com/2024/day/3) | Mull It Over | [code](day03/day03.ts) | [tests](day03/day03.test.ts) | regex, compiler | 🧊 | |
| [Day 4](https://adventofcode.com/2024/day/4) | Ceres Search | [code](day04/day04.ts) | [tests](day04/day04.test.ts) | grid, crosswords | 🧊🧊 | |
| [Day 5](https://adventofcode.com/2024/day/5) | Print Queue | [code](day05/day05.ts) | [tests](day05/day05.test.ts) | graph, topological sort, Kahn's | 🧊🧊🧊 | |
| [Day 6](https://adventofcode.com/2024/day/6) | Guard Gallivant | [code](day06/day06.ts) | [tests](day06/day06.test.ts) | grid, move & turn, detect loops | 🧊🧊 | |
| [Day 7](https://adventofcode.com/2024/day/7) | Bridge Repair | [code](day07/day07.ts) | [tests](day07/day07.test.ts) | equations, combos of + * \|\|, binary and ternary | 🧊🧊 | |
| [Day 8](https://adventofcode.com/2024/day/8) | Resonant Collinearity | [code](day08/day08.ts) | [tests](day08/day08.test.ts) | grid, Manhattan distance | 🧊🧊 | |
| [Day 9](https://adventofcode.com/2024/day/9) | Disk Fragmented | [code](day09/day09.ts) | [tests](day09/day09.test.ts) | disk fragmenting | 🧊🧊🧊 | |
| Day | Title | Code | Tests | Tags | Difficulty | Visual |
|------------------------------------------------|-----------------------|------------------------|------------------------------|---------------------------------------------------|------------|--------|
| [Day 1](https://adventofcode.com/2024/day/1) | Historian Hysteria | [code](day01/day01.ts) | [tests](day01/day01.test.ts) | num list comparison, abs value | 🧊 | |
| [Day 2](https://adventofcode.com/2024/day/2) | Red-Nosed Reports | [code](day02/day02.ts) | [tests](day02/day02.test.ts) | increasing/decreasing num list, deltas | 🧊 | |
| [Day 3](https://adventofcode.com/2024/day/3) | Mull It Over | [code](day03/day03.ts) | [tests](day03/day03.test.ts) | regex, compiler | 🧊 | |
| [Day 4](https://adventofcode.com/2024/day/4) | Ceres Search | [code](day04/day04.ts) | [tests](day04/day04.test.ts) | grid, crosswords | 🧊🧊 | |
| [Day 5](https://adventofcode.com/2024/day/5) | Print Queue | [code](day05/day05.ts) | [tests](day05/day05.test.ts) | graph, topological sort, Kahn's | 🧊🧊🧊 | |
| [Day 6](https://adventofcode.com/2024/day/6) | Guard Gallivant | [code](day06/day06.ts) | [tests](day06/day06.test.ts) | grid, move & turn, detect loops | 🧊🧊 | |
| [Day 7](https://adventofcode.com/2024/day/7) | Bridge Repair | [code](day07/day07.ts) | [tests](day07/day07.test.ts) | equations, combos of + * \|\|, binary and ternary | 🧊🧊 | |
| [Day 8](https://adventofcode.com/2024/day/8) | Resonant Collinearity | [code](day08/day08.ts) | [tests](day08/day08.test.ts) | grid, Manhattan distance | 🧊🧊 | |
| [Day 9](https://adventofcode.com/2024/day/9) | Disk Fragmented | [code](day09/day09.ts) | [tests](day09/day09.test.ts) | disk fragmenting | 🧊🧊🧊 | |
| [Day 10](https://adventofcode.com/2024/day/10) | Hoof It | [code](day10/day10.ts) | [tests](day10/day10.test.ts) | topographic map, bfs, dfs | 🧊🧊 | |
6 changes: 3 additions & 3 deletions 2024/src/2024/day10/day10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ function calcTrailheadScores(grid: Grid) {

while (queue.length > 0) {
const current = queue.shift()!;
const currHeight = parseInt(grid.get(current.serialize())!, 10);
const currHeight = Number.parseInt(grid.get(current.serialize())!);

for (const neighbor of getNeighborCoords(current)) {
const neighborKey = neighbor.serialize();
if (!grid.has(neighborKey) || visited.has(neighborKey)) {
continue;
}

const neighborHeight = parseInt(grid.get(neighborKey)!, 10);
const neighborHeight = Number.parseInt(grid.get(neighborKey)!);
if (neighborHeight === currHeight + 1) {
visited.add(neighborKey);
queue.push(neighbor);
Expand Down Expand Up @@ -81,7 +81,7 @@ function calcTrailheadRatings(grid: Grid) {
continue;
}

const neighborHeight = parseInt(grid.get(neighborKey)!, 10);
const neighborHeight = Number.parseInt(grid.get(neighborKey)!);
if (neighborHeight === currentHeight + 1) {
paths += dfsTrailhead(neighbor, neighborHeight);
}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Collection of my solutions to the [AoC](https://adventofcode.com/) challenges (2

## Quick links

- Advent of Code 2️⃣0️⃣2️⃣4️⃣ : [overview](2024/src/2024/README.md) & [solutions](2024/src/2024) - 18 / 50 ⭐️   ![Progress](https://progress-bar.xyz/36/)
- Advent of Code 2️⃣0️⃣2️⃣4️⃣ : [overview](2024/src/2024/README.md) & [solutions](2024/src/2024) - 20 / 50 ⭐️   ![Progress](https://progress-bar.xyz/40/)
- Advent of Code 2️⃣0️⃣2️⃣3️⃣ : [overview](2015-2023/src/main/kotlin/aoc2023/README.md) & [solutions](2015-2023/src/main/kotlin/aoc2023) - 50 / 50 ⭐️   ![Progress](https://progress-bar.xyz/100/)
- Advent of Code 2️⃣0️⃣2️⃣2️⃣ : [overview](2015-2023/src/main/kotlin/aoc2022/README.md) & [solutions](2015-2023/src/main/kotlin/aoc2022) - 50 / 50 ⭐️   ![Progress](https://progress-bar.xyz/100/)
- Advent of Code 2️⃣0️⃣2️⃣1️⃣ : [overview](2015-2023/src/main/kotlin/aoc2021/README.md) & [solutions](2015-2023/src/main/kotlin/aoc2021) - 50 / 50 ⭐️   ![Progress](https://progress-bar.xyz/100/)
Expand All @@ -19,7 +19,7 @@ Collection of my solutions to the [AoC](https://adventofcode.com/) challenges (2
- Advent of Code 2️⃣0️⃣1️⃣6️⃣ : [overview](2015-2023/src/main/kotlin/aoc2016/README.md) & [solutions](2015-2023/src/main/kotlin/aoc2016) - 50 / 50 ⭐️   ![Progress](https://progress-bar.xyz/100/)
- Advent of Code 2️⃣0️⃣1️⃣5️⃣ : [overview](2015-2023/src/main/kotlin/aoc2015/README.md) & [solutions](2015-2023/src/main/kotlin/aoc2015) - 50 / 50 ⭐️   ![Progress](https://progress-bar.xyz/100/)

Total: 468 / 500 ⭐
Total: 470 / 500 ⭐
![Progress](https://progress-bar.xyz/94/)

<img src="2015-2023/src/main/resources/static/all_stars.png" width="1023" alt="AoC screenshot"/>
Expand Down

0 comments on commit b0e0066

Please sign in to comment.