Function advent_solutions::advent2017::day06::part2 [] [src]

pub fn part2(banks: &Vec<usize>) -> usize

Out of curiosity, the debugger would also like to know the size of the loop: starting from a state that has already been seen, how many block redistribution cycles must be performed before that same state is seen again?

In the example above, 2 4 1 2 is seen again after four cycles, and so the answer in that example would be 4.

assert_eq!(part2(&input), 4);

How many cycles are in the infinite loop that arises from the configuration in your puzzle input?