Problem 1345 · Hard

Jump Game IV

Breadth-first search from the first index, where one step can move one place or jump to any equal value, cleared once used.

Open the interactive visualisation