删除 Solution.java

master
wangsiyuan 2023-09-05 00:13:22 +08:00
parent 91dc6e535c
commit 4f5b97f255
1 changed files with 0 additions and 15 deletions

View File

@ -1,15 +0,0 @@
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;
}
}