
[LeetCode] 1408. String Matching in an Array (Python)
·
알고리즘/LeetCode
난이도: Easy 문제 설명Given an array of string words, return all strings in words that is a substring of another word. You can return the answer in any order. A substring is a contiguous sequence of characters within a string 문제 예제Example 1:Input: words = ["mass","as","hero","superhero"] Output: ["as","hero"] Explanation: "as" is substring of "mass" and "hero" is substring of "superhero". ["hero","as"]..