Compare commits
No commits in common. "61f2db0b7290ca244b65919f152420a50d4e68f1" and "87b994cf7d8687ae7e06c7d53a8071d624dba084" have entirely different histories.
61f2db0b72
...
87b994cf7d
|
|
@ -5,20 +5,15 @@
|
|||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="45f625e1-36c7-4942-8f7c-ba3ebe9a7d53" name="变更" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/src/Solution.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Solution.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="FileTemplateManagerImpl">
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<option value="Class" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
|
|
@ -55,7 +50,7 @@
|
|||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1693822719192</updated>
|
||||
<workItem from="1693822720224" duration="1148000" />
|
||||
<workItem from="1693822720224" duration="784000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,2 @@
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class Solution {
|
||||
public int lengthOfLongestSubstring(String s) {
|
||||
if (s != null){
|
||||
Set<Character> stringList = new HashSet<>();
|
||||
for (int i = 0; i < s.length(); i++) {
|
||||
stringList.add(s.charAt(i));
|
||||
}
|
||||
return stringList.size();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue