sherlockmao's recent timeline updates
sherlockmao

sherlockmao

V2EX member #65584, joined on 2014-06-18 23:58:58 +08:00
Per sherlockmao's settings, the topics list is hidden
Deals info, including closed deals, is not hidden
sherlockmao's recent replies
去加 telegram 的几个 linux 群,每个群体验一下,听听大家常常抱怨的问题再做决定
May 29, 2020
Replied to a topic by wenbinwu 问与答 Golang 学习项目
https://github.com/boltdb/bolt lmdb 的 go 实现,挺不错的
Apr 22, 2020
Replied to a topic by iugo 程序员 LeetCode 新题, 聒噪的青蛙, 参考
Runtime: 4 ms, faster than 100.00% of Go online submissions for Minimum Number of Frogs Croaking.

Memory Usage: 4.8 MB, less than 100.00% of Go online submissions for Minimum Number of Frogs Croaking.

func ord(c byte) int {
switch c {
case byte('c'):
return 0
case byte('r'):
return 1
case byte('o'):
return 2
case byte('a'):
return 3
case byte('k'):
return 4
}
return -1
}

func minNumberOfFrogs(croakOfFrogs string) int {
ans := 0
dp := make([]int, 6)

for i := 0; i < len(croakOfFrogs); i++ {
b := ord(croakOfFrogs[i])
if b < 0 {
return -1
}
if b == 0 {
dp[0]++
if dp[0] > ans {
ans = dp[0]
}
continue
}
if dp[b-1] == 0 {
return -1
}
if b != 1 {
dp[b-1]--
}
if b != 4 {
dp[b]++
} else {
dp[0]--
}
}

for i := 0; i < len(dp); i++ {
if dp[i] != 0 {
return -1
}
}
return ans
}
Mar 13, 2020
Replied to a topic by jeblur Telegram 来看下这篇关于抨击 telegram 的文章
Telegram 刚出来的时候,Signal 的创始人 Moxie 就跟他们争论了很久。当时盖的楼:

https://news.ycombinator.com/item?id=6913456
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1061 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 17:58 · PVG 01:58 · LAX 10:58 · JFK 13:58
♥ Do have faith in what you're doing.