leetcode.cn 2026-06-29
🟢1967.number-of-strings-that-appear-as-substrings-in-word
🏷️ Tags
#array #string
🟢1967.number-of-strings-that-appear-as-substrings-in-word
🏷️ Tags
#array #string
Telegraph
number-of-strings-that-appear-as-substrings-in-word
给你一个字符串数组 patterns 和一个字符串 word ,统计 patterns 中有多少个字符串是 word 的子字符串。返回字符串数目。 子字符串 是字符串中的一个连续字符序列。 示例 1: 输入:patterns = ["a","abc","bc","d"], word = "abc" 输出:3 解释: - "a" 是 "abc" 的子字符串。 - "abc" 是 "abc" 的子字符串。 - "bc" 是 "abc" 的子字符串。 - "d" 不是 "abc" 的子字符串。 patterns…
leetcode.com 2026-06-29
🟢1967.number-of-strings-that-appear-as-substrings-in-word
🏷️ Tags
#array #string
🟢1967.number-of-strings-that-appear-as-substrings-in-word
🏷️ Tags
#array #string
Telegraph
number-of-strings-that-appear-as-substrings-in-word
Given an array of strings patterns and a string word, return the number of strings in patterns that exist as a substring in word. A substring is a contiguous sequence of characters within a string. Example 1: Input: patterns = ["a","abc","bc","d"], word…
leetcode.cn 2026-06-30
🟡1358.number-of-substrings-containing-all-three-characters
🏷️ Tags
#hash_table #string #sliding_window
🟡1358.number-of-substrings-containing-all-three-characters
🏷️ Tags
#hash_table #string #sliding_window
Telegraph
number-of-substrings-containing-all-three-characters
给你一个字符串 s ,它只包含三种字符 a, b 和 c 。 请你返回 a,b 和 c 都 至少 出现过一次的子字符串数目。 示例 1: 输入:s = "abcabc" 输出:10 解释:包含 a,b 和 c 各至少一次的子字符串为 "abc", "abca", "abcab", "abcabc", "bca", "bcab", "bcabc", "cab", "cabc" 和 "abc" (相同字符串算多次)。 示例 2: 输入:s = "aaacb" 输出:3 解释:包含 a,b 和 c 各至少一次的子字符串为…
leetcode.com 2026-06-30
🟡1358.number-of-substrings-containing-all-three-characters
🏷️ Tags
#hash_table #string #sliding_window
🟡1358.number-of-substrings-containing-all-three-characters
🏷️ Tags
#hash_table #string #sliding_window
Telegraph
number-of-substrings-containing-all-three-characters
Given a string s consisting only of characters a, b and c. Return the number of substrings containing at least one occurrence of all these characters a, b and c. Example 1: Input: s = "abcabc" Output: 10 Explanation: The substrings containing at least one…