@@ -0,0 +1,463 @@
+public class Solution %7B%0A    public int lengthOfLongestSubstring(String s) %7B%0A        int n = s.length();%0A        Set%3CCharacter%3E set = new HashSet%3C%3E();%0A        int ans = 0, i = 0, j = 0;%0A        while (i %3C n && j %3C n) %7B%0A            if (!set.contains(s.charAt(j))) %7B%0A                set.add(s.charAt(j++));%0A                ans = Math.max(ans, j - i);%0A            %7D else %7B%0A                set.remove(s.charAt(i++));%0A            %7D%0A        %7D%0A        return ans;%0A    %7D%0A%7D

Add Problem3