https://kotlinlang.org logo
#advent-of-code
Title
# advent-of-code
s

Safi K

12/03/2023, 9:41 PM
I need help with part 2 of today's problem. I get lower result than the expected amount. But I tried debugging manually and everything seems to be working as expected. Have you faced the same problem solving it? If so, what was the issue?
r

raphadlts

12/03/2023, 9:58 PM
Make sure you're considering the cases in which the number is at the end of the line. For example:
..*...755
I had trouble with these 🙂
s

Safi K

12/03/2023, 10:12 PM
Thank you Raphael, but I think my code works for that case. I don't know where is the problem after all this debugging
image.png
t

Tolly Kulczycki

12/03/2023, 10:15 PM
Could you show your code?
👍 1
m

maiatoday

12/04/2023, 4:52 AM
there are also places where the same number is in the same column in different rows, if you have some dedup in your code check that it sees both those numbers
p

Petr Šabata

12/04/2023, 5:44 AM
People also mentioned gears with the same number around more than once. EDIT: Also please next time use thread to paste all your inputs. You can always edit/delete message you posted by mistake.
6 Views