更新 Solution.java

master
wangsiyuan 2023-09-05 15:53:44 +08:00
parent 2e608b6f23
commit b4a5a090c1
1 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,8 @@ import java.util.Map;
import java.util.Set;
public class Solution {
//
public int lengthOfLongestSubstring(String s) {
// 哈希集合,记录每个字符是否出现过
Set<Character> occ = new HashSet<Character>();