摘要: https://leetcode.cn/problems/reverse-nodes-in-k-group/ func main(){ h:=newList() ans:=reverseKGroup(h,3) for ans!=nil{ fmt.Println(ans.Val) ans=ans.Ne 阅读全文
posted @ 2022-06-17 15:15 知道了呀~ 阅读(56) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.cn/problems/best-time-to-buy-and-sell-stock/ func maxProfit(prices []int) int { n:=len(prices) vis:=make([]int,n+1) for i:=n-1;i>=0;i 阅读全文
posted @ 2022-06-17 14:20 知道了呀~ 阅读(52) 评论(0) 推荐(0) 编辑