missing-target-returns-neg-one

Status: IN

`shortest_distance` returns `-1` when the target string is absent from the array, not 0 or an exception — the sentinel check `result < n` distinguishes found from not-found.

Source: entries/2026/06/06/shortest-distance-to-target-string-in-a-circular-array-solution.md

JSON