Notice
Recent Posts
Recent Comments
Link
목록2023/08/23 (1)
넘치게 채우기
[LeetCode] 3. Longest Substring Without Repeating Characters
https://leetcode.com/problems/longest-substring-without-repeating-characters/description/?envType=study-plan-v2&envId=top-interview-150 int: n = len(s) maxLen = 0 left = 0 charSet = set() for right in range(n): while s[right] in charSet: charSet.remove(s[left]) left += 1 charSet.add(s[right]) maxLen = max(maxLen, right - left + 1) return maxLen Java class Solution { public int lengthOfLongestSub..
PS/LeetCode
2023. 8. 23. 23:03