You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/arts/2019-04-04-arts_week_1.md
+1-33Lines changed: 1 addition & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ tags: arts
14
14
15
15
> **本周提纲:**
16
16
> 1. Algorithm: 最长回文子串
17
-
> 2. Review: Go语言中什么时候该使用
17
+
> 2. Review: 什么时候以及为什么使用最少使用(LFU)缓存与Golang中的实现
18
18
> 3. Tip: 一个vim插件`vim-surround`使用
19
19
> 4. Share: 我必须告诉大家的MySQL优化原理
20
20
@@ -74,38 +74,6 @@ class Solution:
74
74
75
75
[When and Why to use a Least Frequently Used (LFU) cache with an implementation in Golang](https://ieftimov.com/post/when-why-least-frequently-used-cache-implementation-golang/)
> 就像前面的 **Algorithm**部分的代码`tempMaxLen = index - i# tempMaxLen = index - i + 1`,以前有个`+1`的运算,如果Hash表中的当前字符的历史位置在现在统计子字符串起始位置之后需要那么新的自字符串的长度为当前的新的字符位置`index` - `i`,为什么不`+1`(上面的if的逻辑中有`+1`),就是因为`startCharIndex = i + 1`(这里`+1`了)
0 commit comments