没有合适的资源?快使用搜索试试~ 我知道了~
leetcode双人赛-Go-LeetcodeProblems:100天代码挑战。用Go语言解决Leetcode问题
共103个文件
go:55个
md:2个
go_build_go_leetcodeproblems_day12_13:1个
需积分: 5 0 下载量 178 浏览量
2021-06-30
04:51:10
上传
评论
收藏 42.46MB ZIP 举报
温馨提示
leetcode双人赛用 Go 语言解决 Leetcode 问题 100天代码 第5天 Leetcode 问题集 961.N-RepeatedElementinSize2NArray 有3种解决方案 1.使用排序时间-> O(nlogn)空间O(1) func repeatedNTimes(A []int) int { // sol 1 sort.Ints(A) l:=len(A)/2 if A[l-1]==A[l]{ return A[l] } else { if A[l-1]==A[l-2]{ return A[l-1] } else if A[l]==A[l+1] { return A[l] } } return 0 } 2.使用映射时间-> o(n) 空间-> O(n) func repeatedNTimes(A []int) int { m:=make(map[int]int) for i:=0;i<len>0{ return A[i] } else { m[A[i
资源推荐
资源详情
资源评论
收起资源包目录
leetcode双人赛-Go-LeetcodeProblems:100天代码挑战。用Go语言解决Leetcode问题 (103个子文件)
.gitignore 31B
LRUCache.go 1KB
SquaresofaSortedArray.go 1KB
sol.go 1KB
FindWordsThatCanBeFormedbyCharacters.go 1KB
StringtoInteger(atoi).go 941B
Kth Largest Element in a Stream.go 933B
sol.go 901B
MinimumWindowSubstring.go 880B
LastStoneWeight.go 743B
RemoveDuplicatesfromSortedArray.go 729B
MergeTwoSortedLists.go 727B
Subdomain Visit Count.go 714B
ContainsDuplicate.go 686B
MaxIncreasetoKeepCitySkyline.go 681B
FirstMissingPositive.go 633B
UniqueEmailAddresses.go 631B
IntersectionofTwoLinkedLists.go 616B
UniqueMorseCodeWords.go 609B
N-RepeatedElementinSize2NArray.go 583B
DIStringMatch.go 576B
SortArrayByParity.go 574B
RelativeSortArray.go 550B
sol.go 541B
MinimumAbsoluteDifference.go 504B
SelfDividingNumbers.go 499B
MajorityElement.go 479B
RemoveLinkedListElements.go 467B
UniqueNumberofOccurrences.go 467B
RemoveDuplicatesfromSortedList.go 465B
CheckIfItIsaStraightLine.go 454B
MiddleoftheLinkedList.go 453B
numberofrecentcalls.go 451B
BestTimetoBuyandSellStockII.go 444B
ProjectionAreaof3DShapes.go 419B
RomantoInteger.go 393B
ReverselinkedList.go 381B
LinkedListCycle.go 374B
SortArrayByParityII.go 373B
sol.go 361B
RemoveAllAdjacentDuplicatesInString.go 345B
RobotReturnToOrigin.go 334B
JewelsandStones.go 319B
RemoveouterParenthases.go 318B
PlayWithChips.go 315B
HeightChecker.go 313B
DeleteColumnstoMakeSorted.go 301B
PeakIndexinaMountainArray.go 297B
FlippinganImage.go 294B
hammingDistance.go 280B
1108_DefanginganIPAddress.go 273B
SplitaStringinBalancedStrings.go 272B
MinimumAddtoMakeParenthesesValid.go 245B
ArrayPartition1.go 234B
DeleteNodeInALinkedList.go 214B
test.go 110B
go_build_1108_DefanginganIPAddress_go 1.9MB
go_build_448 1.91MB
go_build_961 1.91MB
go_build__ 4B
go_build___home_prime_sharedFolder_go_src_Go_LeetcodeProblems_Day20_8_ 1.93MB
go_build_Go_LeetcodeProblems_1207 1.92MB
go_build_Go_LeetcodeProblems_1232 1.91MB
go_build_Go_LeetcodeProblems_136 2MB
go_build_Go_LeetcodeProblems_14 1.91MB
go_build_Go_LeetcodeProblems_169 1.91MB
go_build_Go_LeetcodeProblems_2ndAttempt_76 1.91MB
go_build_Go_LeetcodeProblems_2ndAttempt_DAy2_122 1.91MB
go_build_Go_LeetcodeProblems_3rdAttempt_Day1_1046 1.91MB
go_build_Go_LeetcodeProblems_771 1.9MB
go_build_Go_LeetcodeProblems_804 1.91MB
go_build_Go_LeetcodeProblems_832 1.91MB
go_build_Go_LeetcodeProblems_905 1.92MB
go_build_Go_LeetcodeProblems_Day10_1122 1.93MB
go_build_Go_LeetcodeProblems_Day10_41 1.91MB
go_build_Go_LeetcodeProblems_Day12_13 1.91MB
go_build_Go_LeetcodeProblems_Day12_942 1.91MB
go_build_Go_LeetcodeProblems_Day12_944 1.91MB
go_build_Go_LeetcodeProblems_Day14_876 1.9MB
go_build_Go_LeetcodeProblems_Day15 1.91MB
go_build_Go_LeetcodeProblems_Day15_811 1.94MB
go_build_Go_LeetcodeProblems_Day15_977 1.91MB
go_build_Go_LeetcodeProblems_Day17_929 1.91MB
go_build_Go_LeetcodeProblems_Day19_883 1.91MB
go_build_Go_LeetcodeProblems_Day24_1047 1.91MB
go_build_Go_LeetcodeProblems_Day6_1021 1.9MB
go_build_Go_LeetcodeProblems_Day6_1217 1.91MB
go_build_Go_LeetcodeProblems_Day6_26 1.91MB
go_build_Go_LeetcodeProblems_Day6_657 1.9MB
go_build_Go_LeetcodeProblems_Day7_1221 1.9MB
go_build_Go_LeetcodeProblems_Day7_807 1.91MB
go_build_Go_LeetcodeProblems_day8_461 1.9MB
go_build_Go_LeetcodeProblems_day8_728 1.91MB
go_build_Go_LeetcodeProblems_day8_852 1.91MB
go_build_Go_LeetcodeProblems_Day9_1051 1.92MB
go_build_Go_LeetcodeProblems_Day9_1160 1.91MB
go_build_Go_LeetcodeProblems_Day9_1200 1.91MB
go_build_Go_LeetcodeProblems_Day9_561 1.92MB
go_build_Go_LeetcodeProblems_Day9_922 1.91MB
go_build_Go_LeetcodeProblems_test 1.9MB
共 103 条
- 1
- 2
资源评论
weixin_38741195
- 粉丝: 2
- 资源: 970
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功