![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Go
golang相关
__KevinYzy__
github:https://github.com/KEVINYZY ----
leetcode:https://leetcode.com/seanadfgfeer/ ----
lintcode:https://www.lintcode.com/user/fire-blade ----
nowcoder:https://www.nowcoder.com/profile/1073818
展开
-
Lintcode 161. Rotate Image go
题目链接:https://www.lintcode.com/problem/rotate-image/description/*** @param matrix: a lists of integers* @return: nothing*/func rotate (matrix *[][]int) { // write your code here if (matrix == n...原创 2020-05-07 10:41:01 · 240 阅读 · 2 评论 -
Lintcode 160. Find Minimum in Rotated Sorted Array II go
题目链接:https://www.lintcode.com/problem/find-minimum-in-rotated-sorted-array-ii/description/*** @param nums: a rotated sorted array* @return: the minimum number in the array*/func findMin(nums []in...原创 2020-05-07 10:39:27 · 257 阅读 · 0 评论 -
Lintcode 159. Find Minimum in Rotated Sorted Array go
题目链接:https://www.lintcode.com/problem/find-minimum-in-rotated-sorted-array/description/*** @param nums: a rotated sorted array* @return: the minimum number in the array*/func findMin(nums []int) ...原创 2020-05-07 10:37:39 · 272 阅读 · 1 评论 -
Lintcode 153. Combination Sum II go
题目链接:https://www.lintcode.com/problem/combination-sum-ii/description/*** @param num: Given the candidate numbers* @param target: Given the target number* @return: All the combinations that sum to ...原创 2020-05-07 10:36:08 · 223 阅读 · 0 评论 -
Lintcode 152. Combinations go
题目链接:https://www.lintcode.com/problem/combinations/descriptionfunc combine(n int, k int) [][]int { // write your code here var rst [][]int; var solution []int; helper(&rst, solution, n, k, 1)...原创 2020-05-07 10:34:23 · 198 阅读 · 0 评论 -
Lintcode 151. Best Time to Buy and Sell Stock III go
题目链接:https://www.lintcode.com/problem/best-time-to-buy-and-sell-stock-iii/descriptionconst INT_MAX = int(^uint(0) >> 1)const INT_MIN = ^INT_MAX/*** @param prices: Given an integer array* @...原创 2020-05-07 10:27:59 · 138 阅读 · 0 评论 -
Lintcode 150. Best Time to Buy and Sell Stock II go
题目链接:https://www.lintcode.com/problem/best-time-to-buy-and-sell-stock-ii/description/** * @param prices: Given an integer array * @return: Maximum profit */func maxProfit (prices []int) int { //...原创 2020-05-07 10:26:29 · 178 阅读 · 0 评论 -
Lintcode 149. Best Time to Buy and Sell Stock go
题目链接:https://www.lintcode.com/problem/best-time-to-buy-and-sell-stock/description有点惭愧,这个代码我本地测了几组用例应该是没问题的,但是OJ报了WA,先贴一下代码吧。const INT_MAX = int(^uint(0) >> 1);/*** @param prices: Given an i...原创 2020-05-07 10:21:45 · 149 阅读 · 0 评论 -
Lintcode 143. Sort Colors II go
最近在刷一下go语言,写一些go的解法:/** * @param colors: A list of integer * @param k: An integer * @return: nothing */func sortColors2(colors *[]int, k int) { // write your code here var length int = len(*co...原创 2020-05-07 10:14:25 · 214 阅读 · 0 评论 -
Lintcode 148. Sort Colors go
/** * @param nums: A list of integer which is 0, 1 or 2 * @return: nothing */func sortColors (nums *[]int) { // write your code here if (nums == nil || len(*nums) <= 1) { return; } var p...原创 2020-05-07 10:18:25 · 162 阅读 · 0 评论