Advent of Code 2018. Day 1 part 2

I feel like a brainlet.
Is pic related correct?

In the example +7, +7, -2, -7, -4, 14 does not happen twice.

The same for +3, +3, +4, -2, -4. 10 does not happen twice.

Should I kill myself or is there really a mistake in here?

Attached: Screenshot-2018-12-10 Day 1 - Advent of Code 2018.png (699x201, 22K)

Other urls found in this thread:

pastebin.com/UhPAjScf
twitter.com/SFWRedditImages

The first one?
Starts at 0, goes +1, then 0 again?

>Should I kill myself
yes
>or is there really a mistake in here?
no

The first and third are right. The other two not

Off yourself, retard

Attached: 1535688576544.png (645x586, 236K)

Please enlighten me how second and fourth match the given answer then.

read the paragraph above, it loops until it does reach something twice

Then on the second example why is the answer not 6? It gets to 6 twice before it gets to 10

The same for the last example. The frequency 7 is achieved twice before 14.

Or at least that's how I understood this:
"and that duplicates might be found while in the middle of processing the list."

>3,3,4,-2,-4
>0+3=3
>3+3=6
>6+4=10
>10-2=8
>8-4=4
>4+3=7
>7+3=10
10 is the first one to appear twice.
Kill yourself retard.

3, 6, (10), 8, 4 | 7, (10), 14, 12, 8
where do you see 6 twice?

7, (14), 12, 5, 1 | 8, 15, 13, 6, 2 | 9, 16, (14), 7, 3

This

I understood the "and that duplicates might be found while in the middle of processing the list." wrong.

Thanks

>he wrote all these for a brainlet
what a fucking cuck

Alright guys I am using this to learn C. This is my second C program rate it.
pastebin.com/UhPAjScf

>#define FREQSTORESIZE 10280000
ahaha C tards are adorable

Attached: Screenshot from 2018-12-11 15-10-21.png (1232x1854, 175K)

It's my second C program man. I know I should have used realloc but I was getting annoyed because I understood a part of the explanantion the wrong way

What is this language called?

Is this not java?

definitely not java, i think it's D