Search
⌘K

Leetcode 1065. Index Pairs of a String

Given a string and a list of words, return all index pairs [i, j] where the substring text[i..j] matches any word from the list (overlapping matches allowed), with the pairs sorted by start then end. The core challenge is efficient multi-pattern string matching to find all occurrences of the given words in the text.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.