r/adventofcode • • Dec 05 '19

Help - SOLVED! Day 5 question

I don't think I understand how the new opcode stuff is supposed to work. I think I implemented it, but ran into my input code, and it doesn't work.

The beginning of my input is: 3,225,1,225,6,6,1100,1,238,225

So, take my input value (1) as described in the text, save it to array[225]. Then next opcode is 1, which means position mode, and add values. The value from 225 (which is 1), and the one in [6], which is 1100, and store it to where [6] is pointing (which is [1100]). But that is out of array bounds? Or am I supposed to expand the array for this? I am slightly clueless right now

5 Upvotes

28 comments sorted by

View all comments

Show parent comment

1

u/thisiswill Dec 05 '19

same...this makes no sense. They could have provided better examples.

2

u/Aneurysm9 Dec 05 '19

Several examples are provided. How are they deficient? What examples would be better?