- 395. Longest Substring with At L
- 395. Longest Substring with At L
- 395. Longest Substring with At L
- 395. Longest Substring with At L
- 5-longest-palindromic-substring
- LIS 和 LCS 子序列子串问题
- LeetCode 3. Longest Substring Wi
- Leetcode--Longest Palindromic Su
- Longest Substring Without Repeat
- 3. Longest Substring Without Rep
class Solution(object):
def longestSubstring(self, s, k):
"""
:type s: str
:type k: int
:rtype: int
"""
for c in set(s):
if s.count(c)<k:
return max(self.longestSubstring(t,k) for t in s.split(c))
return len(s)
网友评论