更新 Solution.java
This commit is contained in:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user