index-pairs-brute-force-complexity

Status: IN

indexPairs runs in O(W × N × L) time where W = len(words), N = len(text), L = max word length, due to nested loops with slice comparison. No trie or Aho-Corasick; appropriate for constraints ≤ 100.

Source: entries/2026/06/06/index-pairs-of-a-string-solution.md

JSON