Advent of Code 2024 - Day 25Code Chronicle
| Problem statement | Source code | Tags:
IDK, this feels like a day 3 problem. I parse each lock and key to a list of integers saying how many #s are in each column.
I can tell if a schematic is a key or a lock by testing if the first character is #, since locks have all #s in the first row while keys have all .s.
Finally I just found how many lock-key combinations match with List.for_all2 (fun k l -> k + l <= 7) key lock: