Given a text and a query of two words plus an integer k, return the indices in the text where the distance between the two words is ≤ k.

reported at Palantir

say it first

Answer it out loud, in your own words. Then compare.

Interviewers listen for how you get there, not only where you land. The answer opens once you have tried.