mykl@lemmy.world to Advent Of Code@programming.dev · 11 months ago[2023 Day 3] Motivation time!lemmy.worldimagemessage-square23fedilinkarrow-up196arrow-down18file-text
arrow-up188arrow-down1image[2023 Day 3] Motivation time!lemmy.worldmykl@lemmy.world to Advent Of Code@programming.dev · 11 months agomessage-square23fedilinkfile-text
minus-squarelearningduck@programming.devlinkfedilinkarrow-up4·11 months agoI don’t want to read the number string from both left to right and Ruth to left. So, I iterate through each row and read the number string from left to right Store each number along with its cell range. ie: 467 is 0-2. Then from each symbol, find out if the position of the symbol +/-1 falls into any range. If so then sum that number.
I don’t want to read the number string from both left to right and Ruth to left. So, I