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