摘要: https://leetcode-cn.com/problems/valid-anagram/ func isAnagram(s, t string) bool { if len(s) != len(t) { return false } cnt := map[rune]int{} for _, c 阅读全文
posted @ 2022-04-17 16:17 papering 阅读(8) 评论(0) 推荐(0) 编辑
摘要: https://leetcode-cn.com/problems/valid-anagram/ 异或运算找重复值 func f(s string) int { n := len(s) var a int a = 1 for i := 0; i < n; i++ { a ^= int(rune(s[i 阅读全文
posted @ 2022-04-17 15:52 papering 阅读(31) 评论(0) 推荐(0) 编辑
摘要: Redis源码解析 https://mp.weixin.qq.com/s/xNaEqebyQaXTJoKiQhkC7g 阅读全文
posted @ 2022-04-17 14:57 papering 阅读(46) 评论(0) 推荐(0) 编辑
摘要: https://leetcode-cn.com/problems/ransom-note/ func canConstruct(ransomNote string, magazine string) bool { m := len(ransomNote) n := len(magazine) if 阅读全文
posted @ 2022-04-17 13:47 papering 阅读(35) 评论(0) 推荐(0) 编辑