@@ -0,0 +1,992 @@
+package com.anuragkapur.leetcode;%0A%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0A/**%0A * @author anuragkapur%0A */%0Apublic class LongestSubstringWithoutRepeatingCharacters %7B%0A%0A    public int lengthOfLongestSubstring(String s) %7B%0A%0A        Set%3CCharacter%3E uniqueChars = null;%0A        int longestLength = 0;%0A        char chars%5B%5D = s.toCharArray();%0A        int lengthOfCurrentCandidateString = 0;%0A        for(int i=0; i%3Cchars.length; i++) %7B%0A            uniqueChars = new HashSet%3C%3E();%0A            uniqueChars.add(chars%5Bi%5D);%0A            lengthOfCurrentCandidateString = 1;%0A            for(int j=i+1; j%3Cchars.length; j++) %7B%0A                if(uniqueChars.add(chars%5Bj%5D)) %7B%0A                    lengthOfCurrentCandidateString ++;%0A                %7D else %7B%0A                    break;%0A                %7D%0A            %7D%0A            if(lengthOfCurrentCandidateString %3E longestLength) %7B%0A                longestLength = lengthOfCurrentCandidateString;%0A            %7D%0A        %7D%0A%0A        return longestLength;%0A    %7D%0A%7D%0A

Add brute force attempt to problem #3