初学go,发现没人分享golang的解法,分享一下,大佬勿喷 双指针 func lengthOfLongestSubstring(s string) int { count := make(map[string]int) maxLength := 0 r := 0 n := len(s) for l :=0;l<n;l++{ for r<n{ if _, ok :=count[string(s[r])];!ok{ count[string(s[r])] = 1 r += 1 }else { break } } if r...