Leetcode-cn.com 2021-12-22
🟡 686.repeated-string-match
🏷️ Tags
#string #string_matching
Description
给定两个字符串
注意:字符串
Example
🟡 686.repeated-string-match
🏷️ Tags
#string #string_matching
Description
给定两个字符串
a 和 b,寻找重复叠加字符串 a 的最小次数,使得字符串 b 成为叠加后的字符串 a 的子串,如果不存在则返回 -1。注意:字符串
"abc" 重复叠加 0 次是 "",重复叠加 1 次是 "abc",重复叠加 2 次是 "abcabc"。Example
输入:a = "abcd", b = "cdabcdab"
输出:3
解释:a 重复叠加三遍后为 "abcdabcdabcd", 此时 b 是其子串。
Leetcode-cn.com 2022-04-07
🟢 796.rotate-string
🏷️ Tags
#string #string_matching
Description
给定两个字符串,
例如, 若
Example
🟢 796.rotate-string
🏷️ Tags
#string #string_matching
Description
给定两个字符串,
s 和 goal。如果在若干次旋转操作之后,s 能变成 goal ,那么返回 true 。s 的 旋转操作 就是将 s 最左边的字符移动到最右边。 例如, 若
s = 'abcde',在旋转一次之后结果就是'bcdea' 。Example
输入: s = "abcde", goal = "cdeab"
输出: true
1455_check_if_a_word_occurs_as_a_prefix_of_any_word_in_a_sentenc.pdf
83.1 KB
leetcode.cn 2022-08-21
🟢1455.check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
🏷️ Tags
#string #string_matching
🟢1455.check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
🏷️ Tags
#string #string_matching
1764.form-array-by-concatenating-subarrays-of-another-array.pdf
91.8 KB
leetcode.cn 2022-12-17
🟡1764.form-array-by-concatenating-subarrays-of-another-array
🏷️ Tags
#greedy #array #string_matching
🟡1764.form-array-by-concatenating-subarrays-of-another-array
🏷️ Tags
#greedy #array #string_matching
28.find-the-index-of-the-first-occurrence-in-a-string.pdf
54.4 KB
leetcode.com 2023-03-03
🟡28.find-the-index-of-the-first-occurrence-in-a-string
🏷️ Tags
#two_pointers #string #string_matching
🟡28.find-the-index-of-the-first-occurrence-in-a-string
🏷️ Tags
#two_pointers #string #string_matching