376. 摆动序列 求取所有的差值保存起来。然后再判断一正一负的规律是否成立 var flag int
func wiggleMaxLength(nums []int) int {if len(nums) < 1 {return 0}if len(nums) 1 {return 1}var res intresult : make([]int,len(nums))m : 0for i:0; i<len(nums)-1; i {if…
共享库工具 Currently plugins are only supported on Linux and macOS 通过plugin我们可以很方便的对于不同功能加载相应的模块并调用相关的模块;也可以针对不同语言(英文、汉语、德语……)加载不同的语言so文件,进行不同的输出&…
文章目录GoroutinesChannelsBuffered ChannelsRange and CloseSelectfatal error: all goroutines are asleep - deadlock!Default Selectionsync.MutexExercise: Web Crawler官方网站Goroutines
A goroutine is a lightweight thread managed by the Go runtime.
go f(x, y,…
Use RPC to make a kv storage server
Go example: kv.go on schedule page A toy key/value storage server – Put(key,value), Get(key)->value Uses Go’s RPC library Common: Declare Args and Reply struct for each server handler. Client: connect()s Dial() cre…