Problem 1848 · Easy

Minimum Distance to the Target Element

Find the shortest index distance from start to an occurrence of target.

Open the interactive visualisation