Nice! Yeah I started last years AOC in Go but just didn’t follow through with finishing, lol.
Bitmasks is definitely more efficient. My way was just what made sense to me. I try to write the code like I think, and that is DEFINITELY not the most efficient way 😂
I'd say, just do what works for you. Don't optimize as long as it is not necessary. Also, you'll spend way more time reading and trying to understand code than writing it. That alone is reason enough to make it as simple and comprehensible as possible. Often, the shortest or most clever solution can be hard to grasp.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice! Yeah I started last years AOC in Go but just didn’t follow through with finishing, lol.
Bitmasks is definitely more efficient. My way was just what made sense to me. I try to write the code like I think, and that is DEFINITELY not the most efficient way 😂
I'd say, just do what works for you. Don't optimize as long as it is not necessary. Also, you'll spend way more time reading and trying to understand code than writing it. That alone is reason enough to make it as simple and comprehensible as possible. Often, the shortest or most clever solution can be hard to grasp.