JP's Blog

  • GitHub * Flickr * Resume
  • Programming
  • Reviews
  • Home Automation
  • Photography
  • Maker
  • Writing
  • Research
  • Search
  • RSS

AoC 2024 Day 4: Gridnator

2024-12-04

Source: Day 4: Ceres Search

Full solution for today (spoilers!).

  • Source: Day 4: Ceres Search
  • Part 1
    • Grid
    • Iterating over XMAS
    • Optimization 1: Less loops
  • Part 2
  • Benchmarks

Part 1

Given a grid of letters, count how many times XMAS appears in any direction (horizontally, vertically, diagonally; forward or backward).

read more...

  • All posts: By Date
  • All posts: By Tag
  • RSS: All
  • RSS: programming/topics

All posts unless otherwise mentioned are licensed under Creative Commons License

Any source code unless otherwise mentioned is licensed under the 3 clause BSD license