Approach hintTry it first, then revealHide
Track the farthest index reachable so far while scanning; if the current index ever lies beyond it, the last index cannot be reached.
Track the farthest index reachable so far while scanning; if the current index ever lies beyond it, the last index cannot be reached.