@@ -54,7 +54,7 @@ func lengthOfLongestSubstring(s string) int {
if i-cursor > maxCount {
maxCount = i - cursor
}
- cursor++
+ cursor = record[s[i]] + 1
record[s[i]] = i