Golang | Leetcode Golang题解之第438题找到字符串中所有字母异位词
题目: 题解: func findAnagrams(s, p string) (ans []int) {sLen, pLen : len(s), len(p)if sLen < pLen {return}count : [26]int{}for i, ch : range p {count[s[i]-a]count[ch-a]--}differ : 0for _, c : range count {if c ! 0 {differ}}if diff…
2026-03-16