更新 Solution.java

master
wangsiyuan 2023-09-05 15:54:21 +08:00
parent 2273c1e6e1
commit e8f2a5b6b1
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ import java.util.Set;
public class Solution { public class Solution {
// //给定一个字符串 s ,找出其中不含有重复字符的 最长子串 的长度。
public int lengthOfLongestSubstring(String s) { public int lengthOfLongestSubstring(String s) {
// 哈希集合,记录每个字符是否出现过 // 哈希集合,记录每个字符是否出现过
Set<Character> occ = new HashSet<Character>(); Set<Character> occ = new HashSet<Character>();