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