Compare commits
3 Commits
2e608b6f23
...
e8f2a5b6b1
| Author | SHA1 | Date | |
|---|---|---|---|
| e8f2a5b6b1 | |||
| 2273c1e6e1 | |||
| b4a5a090c1 |
3
.idea/workspace.xml
generated
3
.idea/workspace.xml
generated
@@ -7,7 +7,6 @@
|
|||||||
<list default="true" id="45f625e1-36c7-4942-8f7c-ba3ebe9a7d53" name="变更" comment="">
|
<list default="true" id="45f625e1-36c7-4942-8f7c-ba3ebe9a7d53" name="变更" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/solution/Solution.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/solution/Solution.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/solution/Solution.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/solution/Solution.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/solution/test.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/solution/test.java" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -78,7 +77,7 @@
|
|||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1693822719192</updated>
|
<updated>1693822719192</updated>
|
||||||
<workItem from="1693822720224" duration="5742000" />
|
<workItem from="1693822720224" duration="5742000" />
|
||||||
<workItem from="1693895305007" duration="5015000" />
|
<workItem from="1693895305007" duration="5131000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
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>();
|
||||||
|
|||||||
Reference in New Issue
Block a user