← ALL NOTES
Array

1408. String Matching in an Array

Return every word that's a substring of some other word in the array. With a small array of short words, the direct all-pairs check is fine, and string::find handles the substring test.

Loading…