更新 Solution.java
parent
2273c1e6e1
commit
e8f2a5b6b1
|
|
@ -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>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue