All prompts are owned by LeetCode. To view the prompt, click the title link above.
First completed : January 07, 2025
Last updated : January 07, 2025
Related Topics : Array, String, String Matching
Acceptance Rate : 69.88 %
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)]