@@ -0,0 +1,862 @@
+%22%22%22%0AGiven a string, find the length of the longest substring without repeating%0Acharacters. For example, the longest substring without repeating letters for%0A%22abcabcbb%22 is %22abc%22, which the length is 3. For %22bbbbb%22 the longest substring%0Ais %22b%22, with the length of 1.%0A%22%22%22%0A%0A%0Aclass Solution:%0A    # @param %7Bstring%7D s%0A    # @return %7Binteger%7D%0A    def lengthOfLongestSubstring(self, s):%0A        if not s:%0A            return 0%0A%0A        start, end, result = 0, 0, 0%0A        character_dict = %7B%7D%0A        while end %3C len(s):%0A            if s%5Bend%5D not in character_dict:%0A                character_dict%5Bs%5Bend%5D%5D = end%0A            else:%0A                result = max(result, end - start)%0A                start = max(start, character_dict%5Bs%5Bend%5D%5D + 1)%0A                character_dict%5Bs%5Bend%5D%5D = end%0A            end += 1%0A        result = max(result, end - start)%0A%0A        return result%0A

Add 20150518 question.