没有合适的资源?快使用搜索试试~ 我知道了~
leetcode部分排序类-LeetCode:力码
共270个文件
cpp:262个
h:2个
txt:2个
需积分: 5 0 下载量 182 浏览量
2021-06-30
16:01:13
上传
评论
收藏 334KB ZIP 举报
温馨提示
leetcode部分排序类 Summary Summary of LeetCode problems Overall average runtime 就是amortized runtime,注意这个和runtime的差异 题目没有思路的时候考虑极端情况,或许会有启发 避免int 和 .size()-1 比较(可能会有unsigned overflow),最好改成左侧+1 注意观察题目条件,例如所有都是正数,出现次数超过一半,帮助算法思考 e.g.040 注意边界条件 two pointers 互相不能够越界 e.g.125 多使用temp variable来记住一些condition,帮助解题 e.g.008, 049 题目可以拆分成为subtask,一步步解决 e.g.57 存储状态的时候,可以考虑使用input的空间 e.g.73 让1st row, 1st col 记住对应行列的状态 记住是否访问过 board 用bool[][] 或者unsigned long long来保存两个int index edge case 把数值分界区和特殊值都列举出来,一一测试 Class mem
资源推荐
资源详情
资源评论
收起资源包目录
leetcode部分排序类-LeetCode:力码 (270个子文件)
399EvaluateDivision.cpp 5KB
212. Word Search II.cpp 5KB
505. The Maze II.cpp 5KB
008StringtoInteger(atoi).cpp 5KB
236LowestCommonAncestorofABinaryTree.cpp 5KB
449SerializeandDeserializeBST.cpp 5KB
975OddEvenJump.cpp 5KB
068TextJustification.cpp 5KB
109ConvertSortedListtoBinarySearchTree.cpp 4KB
061RotateList.cpp 4KB
081SearchinRotatedSortedArrayII.cpp 4KB
036ValidSudoku.cpp 4KB
033SearchinRotatedSortedArray.cpp 4KB
307RangeSumQueryMutable.cpp 4KB
336. Palindrome Pairs.cpp 4KB
016_3SumClosest.cpp 4KB
723. Candy Crush.cpp 4KB
146. LRU Cache.cpp 4KB
26. Remove Duplicates from Sorted Array.cpp 4KB
1057CampusBikes.cpp 4KB
957. Prison Cells After N Days.cpp 4KB
034FindFirstandLastPositionofElementinSortedArray.cpp 4KB
029DivideTwoIntegers.cpp 4KB
130SurroundedRegions.cpp 4KB
297SerializeandDeserializeBinaryTree.cpp 4KB
329LongestIncreasingPathinaMatrix.cpp 4KB
134GasStation.cpp 4KB
117PopulatingNextRightPointersinEachNodeII.cpp 4KB
097InterleavingString.cpp 4KB
173BinarySearchTreeIterator.cpp 4KB
731. My Calendar II.cpp 4KB
468ValidateIPAddress.cpp 4KB
124BinaryTreeMaximumPathSum.cpp 4KB
778. Swim in Rising Water.cpp 4KB
886PossibleBipartition.cpp 4KB
106ConstructBinaryTreefromInorderandPostorderTraversal.cpp 4KB
027RemoveElement.cpp 4KB
080RemoveDuplicatesfromSortedArrayII.cpp 3KB
687LongestUnivaluePath.cpp 3KB
085MaximalRectangle.cpp 3KB
110BalancedBinaryTree.cpp 3KB
160. Intersection of Two Linked Lists.cpp 3KB
122BestTimetoBuyandSellStockII.cpp 3KB
222. Count Complete Tree Nodes.cpp 3KB
402RemoveKDigits.cpp 3KB
084LargestRectangleinHistogram.cpp 3KB
224BasicCalculator.cpp 3KB
018_4Sum.cpp 3KB
1008ConstructBinarySearchTreefromPreorderTraversal.cpp 3KB
091DecodeWays.cpp 3KB
098ValidateBinarySearchTree.cpp 3KB
1035UncrossedLines.cpp 3KB
662. Maximum Width of Binary Tree.cpp 3KB
XORSum.cpp 3KB
489RobotRoomCleaner.cpp 3KB
482LicenseKeyFormatting.cpp 3KB
208ImplementTriePrefixTree.cpp 3KB
31. Next Permutation.cpp 3KB
019RemoveNthNodeFromEndofList.cpp 3KB
127WordLadder.cpp 3KB
021MergeTwoSortedLists.cpp 3KB
210CourseScheduleII.cpp 3KB
112PathSum.cpp 3KB
121BestTimetoBuyandSellStock.cpp 3KB
66. Plus One.cpp 3KB
116. Populating Next Right Pointers in Each Node.cpp 3KB
123BestTimetoBuyandSellStockIII.cpp 3KB
1472. Design Browser History.cpp 3KB
020ValidParentheses.cpp 3KB
787CheapestFlightsWithinKStops.cpp 3KB
947MostStonesRemovedwithSameRoworColumn.cpp 3KB
290WordPattern.cpp 3KB
300LongestIncreasingSubsequence.cpp 3KB
005LongestPalindromicSubstring.cpp 3KB
082RemoveDuplicatesfromSortedListII.cpp 3KB
1396. Design Underground System.cpp 3KB
105ConstructBinaryTreefromPreorderandInorderTraversal.cpp 3KB
380InsertDeleteGetRandomO1.cpp 3KB
430. Flatten a Multilevel Doubly Linked List.cpp 3KB
857MinimumCosttoHireKWorkers .cpp 3KB
138CopyListwithRandomPointer.cpp 3KB
190. Reverse Bits.cpp 3KB
006ZigZagConversion.cpp 3KB
901OnlineStockSpan.cpp 3KB
929UniqueEmailAddresses.cpp 3KB
986IntervalListIntersections.cpp 3KB
547. Friend Circles.cpp 3KB
304RangeSumQuery2DImmutable.cpp 3KB
064MinimumPathSum.cpp 3KB
207CourseSchedule.cpp 3KB
1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit.cpp 3KB
332. Reconstruct Itinerary.cpp 3KB
040CombinationSumII.cpp 3KB
79. Word Search.cpp 3KB
103. Binary Tree Zigzag Level Order Traversal.cpp 3KB
974SubarraySumsDivisiblebyK.cpp 3KB
048RotateImage.cpp 3KB
054SpiralMatrix.cpp 3KB
111MinimumDepthofBinaryTree.cpp 3KB
174. Dungeon Game.cpp 3KB
共 270 条
- 1
- 2
- 3
资源评论
weixin_38712416
- 粉丝: 8
- 资源: 938
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功