Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 651 Bytes

README.md

File metadata and controls

20 lines (13 loc) · 651 Bytes

Advent of Code

Tips and Tricks

  • HashSets / HashMaps, memoization, look up tables
  • Boolean HashMaps can often be done as a bitset if small enough range
  • Iterators are often faster than loops
  • Parallelization is usually a trap, there's an algorithm or pattern somewhere that should be used instead
  • nom is great for parsing inputs

Simple tricks to consider if stuck

  • Modulo lowest common multiple (lcm) when needing to maintain a divisor over a set of buckets
    • 2022/day11

Future thoughts

  • A re-usable shortest path trait or something might be really useful for a lot of problems