串联所有单词的子串
题目链接: https://leetcode.cn/problems/substring-with-concatenation-of-all-words/description
解题思路:
以字符串
s
的每个字符为开头,截取words
所有字符串长度之和的子串遍历
words
,构建哈希表遍历子串,将子串拆分楚跟
words
等量的字符串,判断字符串是否都出现在哈希表中若存在未在哈希表的字符串,则该子串非串联子串
复杂度分析
最后更新于
这有帮助吗?