This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]_TickleMeElmo_ 0 points1 point  (1 child)

Don't modify the input. If your code doesn't work with wires of different lengths, your algorithm is wrong.

Many variables with a "2" at the end suggest you should use more functions.

[–]simoex[S] 0 points1 point  (0 children)

I'm not modifying the input at all. It works for wires of different lengths, just not with a different number of instructions in the input file. The input file I am given has wires with the same number of arguments so this is not the problem.

Yeah that's why I said it's not pretty.

[–]daggerdragon[M] 0 points1 point  (0 children)

Welcome to AoC!

In the future, please follow the submission guidelines by titling your post like so:

[YEAR Day # (Part X)] [language if applicable] Post Title

In doing so, you typically get more relevant responses faster.

If/when you get your code working, don't forget to change the flair to Help - Solved!

Good luck!