@@ -0,0 +1,690 @@
+package leetcode;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0A/**%0A * https://oj.leetcode.com/problems/longest-substring-without-repeating-characters/%0A */%0Apublic class Problem3 %7B%0A    public int lengthOfLongestSubstring(String s) %7B%0A        Map%3CCharacter, Integer%3E charToIndices = new HashMap%3C%3E();%0A        int maxLength = 0, minIdx = 0;%0A        for (int i = 0; i %3C s.length(); i++) %7B%0A            if (charToIndices.containsKey(s.charAt(i))) %7B%0A                minIdx = Math.max(charToIndices.get(s.charAt(i)) + 1, minIdx);%0A            %7D%0A            maxLength = Math.max(maxLength, i - minIdx + 1);%0A            charToIndices.put(s.charAt(i), i);%0A        %7D%0A        return maxLength;%0A    %7D%0A%7D%0A

Solve problem 3 (sort of)