It is about Advent of Code 2016, day 14 part two. I cannot get that part solved, and I cannot get the example given. Here is a link to that exercise:
link to aoc2016_14_2
In the example they say that 10 is the first index, and that is what I get as well. However, they state that 22551 is the index of the 64th key, its hash containing "fff" and the hash of "abc22859" has "fffff".
My code however says that 22551 is not a key. The hash I get from index 22551 is "2df6e9378c3c53abed6d3508b6285fff", indeed containing "fff", but the hash of "abc22859" is "d489b5d5080a10bed5f4924dfcb1ab4f", so it does not contain "fffff". I looked on internet, but found no clear explanations. Some had the same problem as I, some had no problems at all, and some pointed out that you had to watch the order of the keys found (but I think they were using a Set to store the keys, and I am using an ArrayList).
Has anyone made this exercise, or can anyone shed some light into my darkness? This is the code I use:
and this is the output: