Minimum distance between two words in an array
Filed under LinkedIn
The question
Given an array of strings and two specific words, find the minimum distance between the occurrences of these two words in the array.
No write-up yet. Related questions below have one.
Related LinkedIn questions
Collected from public candidate posts and coding forums. Updated Nov 2026.