The ancient civilization on Pluto was known for its ability to manipulate spacetime, and while The Historians explore their infinite corridors, you’ve noticed a strange set of physics-defying stones.
Solution in Java
Full source can be found: in GitHub
Part 1
For today the first step is writing a recursive method that computes the amount of blinks per stone in the input. This method stonesAfterBlink
accepts the amount of blinks remaining, which is 25 for part 1. And uses a map as a cache, to prevent recalculation of any situation with the same amount of blinks left and for the same stone.