From 4f5b97f25545a25c7b6f40e00e5c6d48ea28bb9b Mon Sep 17 00:00:00 2001 From: wangsiyuan <2392948297@qq.com> Date: Tue, 5 Sep 2023 00:13:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20Solution.java?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Solution.java | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 src/Solution.java diff --git a/src/Solution.java b/src/Solution.java deleted file mode 100644 index 3cc3e06..0000000 --- a/src/Solution.java +++ /dev/null @@ -1,15 +0,0 @@ -import java.util.HashSet; -import java.util.Set; - -public class Solution { - public int lengthOfLongestSubstring(String s) { - if (s != null){ - Set stringList = new HashSet<>(); - for (int i = 0; i < s.length(); i++) { - stringList.add(s.charAt(i)); - } - return stringList.size(); - } - return 0; - } -}