filmov
tv
Ceres Search [Day 4 - Advent of Code 2024 - Python]

Показать описание
I am given a large block of text containing a bunch of X, M, A, and S. In part 1, I have to find every instance of the word XMAS and return the count. In part 2, I need to search for places where two instances of the word MAS are crossed at the A, like:
M S
A
M S
I'll start by creating sets for each of the letters with all the points they are located at, which is a nice mapping to work with. In part 2, I'll use some lambda functions as helpers to make the checks more intuitive.
[00:00] Part1 introduction
[00:46] Setup / data overview
[01:27] Making char_map
[02:37] Counting XMAS
[05:54] Solving part 1
[06:25] Slight part 1 improvement
[06:52] Part 2 challenge
[07:29] Start counting X-MAS
[08:01] Creating helper functions
[09:38] Counting X-MAS
[11:42] Solving part 2
[11:53] Conclusion
#adventofcode #python
M S
A
M S
I'll start by creating sets for each of the letters with all the points they are located at, which is a nice mapping to work with. In part 2, I'll use some lambda functions as helpers to make the checks more intuitive.
[00:00] Part1 introduction
[00:46] Setup / data overview
[01:27] Making char_map
[02:37] Counting XMAS
[05:54] Solving part 1
[06:25] Slight part 1 improvement
[06:52] Part 2 challenge
[07:29] Start counting X-MAS
[08:01] Creating helper functions
[09:38] Counting X-MAS
[11:42] Solving part 2
[11:53] Conclusion
#adventofcode #python
Day 4: Ceres Search | Advent of Code 2024
Ceres Search [Day 4 - Advent of Code 2024 - Python]
Advent of Code 2024 - Day 4 - Ceres Search
Advent of Code 2024 Day 4: Ceres Search in C# ✅✅
Advent of Code 2024 - Day 4 - Ceres Search
Advent of Code 2024 in Bash: Day 4 - Ceres Search
Advent of Code 2024 | Day 04 'Ceres Search'
Day 4: Ceres Search | Javascript | Advent of Code 2024
Advent of Code 2024 - Day 4: Ceres Search
Advent of Code 2024 Go - Day 4: Ceres Search
Advent of Code 2024 - Day 4: Ceres Search (Working with Matrices!)
Advent of Code 2024 Day 4: Ceres Search Using Excel
Advent of Code 2024 Day 4: Ceres Search
Day 4 Ceres Search 2024 in ARM ASM Advent of Code
Advent of Code, Day 4: Ceres Search
Advent of Code | Day 4: Ceres Search | Example | Visualization
Advent of Code 2024 - Day 04 (Ceres Search) - Functional Java!
Advent of Code | Day 4: Ceres Search | Part 1 | Visualization
Solving Advent Of Code 2024 - Day 4: Ceres Search (Part two)
[Rust Programming] Advent of Code 2024 - Day 4 - Ceres Search
Advent of Code 2024 - Day 04 - Ceres Search in Python
Day 4: Ceres Search
Advent of Code 2024 Java - Day 04 Ceres Search
#4 Day 04 Ceres Search | Advent Of Code 2024
Комментарии