Function advent_solutions::advent2017::day05::part2
[−]
[src]
pub fn part2(jumps: &Vec<isize>) -> usize
Now, the jumps are even stranger: after each jump, if the offset was
three or more, instead decrease it by 1. Otherwise, increase it by
1 as before.
Using this rule with the above example, the process now takes 10
steps, and the offset values after finding the exit are left as
2 3 2 3 -1.
assert_eq!(part2(&input), 10);
How many steps does it now take to reach the exit?