摘要:
原题链接 1 class Solution { 2 public: 3 string modifyString(string s) { 4 int lens = s.length(); 5 for(int i = 0; i < lens; ++i) { 6 if(s[i] == '?') { 7 i 阅读全文
摘要:
原题链接 1 class Solution: 2 def isSubsequence(self, s: str, t: str) -> bool: 3 lens,lent = len(s),len(t) 4 i = j = 0 5 while i < lens and j < lent: 6 if 阅读全文
摘要:
原题链接 1 class Solution: 2 def findLengthOfLCIS(self, nums: List[int]) -> int: 3 ans = begin = 0 4 for i in range(len(nums)): 5 if i > 0 and nums[i] <= 阅读全文
摘要:
原题链接 begin为最长不含重复字符的子字符串的起点 1 class Solution: 2 def lengthOfLongestSubstring(self, s: str) -> int: 3 begin,ans,dic = 0,0,{} 4 for index,c in enumerate 阅读全文