Skip to content

Solve 2024 day 4#45

Merged
katzuv merged 10 commits intomainfrom
solve/2024-04
Oct 26, 2025
Merged

Solve 2024 day 4#45
katzuv merged 10 commits intomainfrom
solve/2024-04

Conversation

@katzuv
Copy link
Copy Markdown
Owner

@katzuv katzuv commented Oct 26, 2025

No description provided.

@github-actions github-actions bot added the Solution Puzzle solution label Oct 26, 2025
@katzuv katzuv marked this pull request as ready for review October 26, 2025 23:10
Copilot AI review requested due to automatic review settings October 26, 2025 23:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements solutions for Advent of Code 2024 Day 4, which involves finding patterns in a word search grid. Part 1 searches for "XMAS" in all directions (horizontal, vertical, and diagonal), while Part 2 searches for X-shaped "MAS" patterns centered on the letter "A".

  • Adds p1.py to search for "XMAS" occurrences in all 8 directions across a text matrix
  • Adds p2.py to find X-shaped "MAS" patterns by checking diagonal arrangements around each "A"

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
puzzles/solutions/2024/d04/p1.py Implements logic to extract all text sequences (rows, columns, diagonals) and count "XMAS" occurrences
puzzles/solutions/2024/d04/p2.py Implements logic to find "A" characters and validate X-shaped "MAS" patterns around them

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@katzuv katzuv merged commit 8f4a67a into main Oct 26, 2025
1 check passed
@katzuv katzuv deleted the solve/2024-04 branch October 26, 2025 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Solution Puzzle solution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants