没有合适的资源?快使用搜索试试~ 我知道了~
尖峰数组leetcode-Lint-Code:虚拟尝试LintCode问题的历史
共89个文件
py:88个
md:1个
需积分: 12 0 下载量 175 浏览量
2021-06-30
10:03:01
上传
评论
收藏 58KB ZIP 举报
温馨提示
尖峰数组leetcode 代码 虚拟尝试 Lint Code 问题的历史 12月16日 No.511 交换链表中的两个节点 结构: v1_pointer,v2_pointer = None,None # 指向具有值 == v1 和值 == v2 的节点的指针 v1_prev,v2_prev = None,None # 指向 v1_pointer 和 v2_pointer 之前节点的指针 v1_next,v2_next = None,None # 指向 v1_pointer 和 v2_pointer 的下一个节点的指针 过程: 首先找到指向值为 v1 和 v2 的节点的指针。 如果我们发现其中至少有一个缺失,我们什么都不做,直接返回原始链表。 除此以外: 如果节点是邻居节点(我们可以通过next节点和prev节点检查)我们直接交换它们,只使用一个prev和一个next指针。 这对于此问题的时间限制要求至关重要 如果它们不是邻居节点,我们交换它们,使用两个prev和next指针。 11月18日 No.532 反向对 结构: Solution.counter: int # 存储反向对的数量
资源推荐
资源详情
资源评论
收起资源包目录
Lint-Code-master.zip (89个子文件)
Lint-Code-master
426 restoreIPAddresses.py 1KB
425 letterCombinationsOfAPhoneNumber.py 841B
518 superUglyNumber.py 645B
427 generateParenthesis.py 780B
534 houseRobberII.py 2KB
223 palindromeLinkedList.py 833B
98 sortList-MergeSort.py 2KB
532 reversePairs.py 942B
137 cloneGraph-BFS.py 1KB
419 romanToInteger.py 511B
116 jumpGame.py 810B
512 decodeWays.py 584B
99 reorderList-reverse.py 2KB
363 trappingRainWater.py 1KB
513 perfectSquares.py 424B
102 linkedListCycle.py 646B
406 minimumSizeSubarraySum-Onlogn.py 1KB
160 findMinimumInRotatedArray-duplicateNumbers.py 1KB
119 editDistance.py 673B
105 CopyListwithRandomPointer.py 1KB
149 bestTimetoBuyandSellStock.py 497B
442 implementTrie.py 1KB
135 combinationSum.py 1KB
152 combinations.py 836B
107 wordBreak.py 1KB
99 reorderList-divide.py 1KB
383 containerWithMostWater.py 441B
436 maximalSquare.py 781B
384 longestSubstringWithoutRepeating.py 807B
123 wordSearch.py 2KB
136 palindromePartitioning.py 981B
164 uniqueBinarySearchTrees-II.py 2KB
113 removeDuplicatesFromSortedList.py 1KB
380 intersectionOfTwoLinkedLists.py 1KB
428 powerFunction.py 416B
381 spiralMatrixII.py 1KB
106 convertSortedListToBalancedBST.py 2KB
511 swapTwoNodesInLinkedList.py 3KB
151 bestTimetoBuyandSellStock-III.py 889B
98 sortList-QuickSort.py 2KB
406 minimumSizeSubarraySum.py 658B
117 jumpGameII.py 390B
116 jumpGame-dp.py 561B
515 paintHouse.py 419B
170 rotateLinkedList.py 930B
424 evaluateReversePolishNotation.py 920B
388 permutationSequence.py 804B
189 firstMissingPositive.py 546B
178 graphValidTree.py 616B
528 flattenNestedListIterator-stack.py 2KB
97 validateBinaryTree.py 1KB
104 mergeKLists.py 1KB
148 sortColors.py 651B
528 flattenNestedListIterator-queue.py 2KB
124 longestConsecutiveSequence.py 924B
392 houseRobber.py 473B
Binary Search
98 sortList-MergeSort.py 2KB
532 reversePairs.py 942B
160 findMinimumInRotatedArray-duplicateNumbers.py 1KB
164 uniqueBinarySearchTrees-II.py 2KB
106 convertSortedListToBalancedBST.py 2KB
98 sortList-QuickSort.py 2KB
97 validateBinaryTree.py 1KB
104 mergeKLists.py 1KB
148 sortColors.py 651B
159 findMinimumInRotatedArray.py 729B
163 uniqueBinarySearchTrees.py 400B
171 anagrams.py 570B
418 integerToRoman.py 846B
127 topologicalSorting-BFS.py 1KB
187 gasStation.py 905B
137 cloneGraph-DFS.py 765B
161 rotateImage.py 860B
477 surroundingRegions.py 987B
162 setMatrixZeroes.py 728B
118 distinctSubsequences.py 660B
120 wordLadder.py 876B
200 longestPalindromicSubstring.py 748B
184 Largest Number.py 319B
README.md 34KB
159 findMinimumInRotatedArray.py 729B
508 wiggleSort.py 806B
535 houseRobberIII.py 872B
127 topologicalSorting-DFS.py 965B
108 palindromePartitionII.py 723B
186 maxPointsOnALine.py 1KB
163 uniqueBinarySearchTrees.py 400B
374 spiralMatrix.py 1KB
150 bestTimetoBuyandSellStock-II.py 643B
共 89 条
- 1
资源评论
weixin_38526208
- 粉丝: 3
- 资源: 940
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功