Skip to content

Files

Latest commit

Zanger67/leetcodeZanger67/leetcode
Zanger67/leetcode
and
Zanger67/leetcode
Mar 16, 2025
03398f8 · Mar 16, 2025

History

History
32 lines (21 loc) · 780 Bytes

_1408. String Matching in an Array.md

File metadata and controls

32 lines (21 loc) · 780 Bytes

All prompts are owned by LeetCode. To view the prompt, click the title link above.

Back to top


First completed : January 07, 2025

Last updated : January 07, 2025


Related Topics : Array, String, String Matching

Acceptance Rate : 69.88 %


Solutions

Python

class Solution:
    def stringMatching(self, words: List[str]) -> List[str]:
        return [x for x in words if any(x in y and x != y for y in words)]