Advent of Code 2024 Day 22

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ธ.ค. 2024

ความคิดเห็น • 2

  • @Volganian
    @Volganian 9 วันที่ผ่านมา +4

    I was 100% sure today that part 2 will be about ridiculously huge binary numbers, since all the calculations are bitwise operations. Especially after I made some mistakes in my first implementation of calculcations, and saw some really big numbers. So I spent about an hour and a half implementing my own bit number operations class and had a lot of fun, and it did work! But of course that was really slow, so for part 2 I had to fallback to regular bitwise operations after that anyway :)

  • @waplet
    @waplet 8 วันที่ผ่านมา +1

    I just created a "dict" for sequences and their score per "linenumber". In Go. map[Sequence]map[int]int. Where sequence is just last 4 diffs and add it to map if only there is no present record for the "linenumber" aka first occurance of sequence for initial number. Then just iterate all sequences to find the maximum one for all the line numbers. ~2s in Go