关于LeetCode刷题及题目列表归纳

版权声明:博主GitHub网址https://github.com/29DCH,欢迎大家前来交流探讨和fork。 https://blog.csdn.net/CowBoySoBusy/article/details/82559651

    时间真快啊,转眼间就大三了!马上就要面临投简历找工作笔试面试或者准备考研了.

    对我们学校的软工专业来说,大三可以说是最关键的一年了,这一年可能会决定很多东西.在实验室,我主要是学习理论知识和做项目实践为主.到现在也大大小小做了不少项目了.但是现在我想说一下我对刷题的看法.虽然我不像实验室那些搞ACM的同学那样,每天刷题和打比赛,但是从大一一路走来,经历了各种比赛,比如蓝桥,天梯,校赛等等,还有刷了一些数据结构和算法思维题,对刷题这方面虽然不是热爱,但还是有不少心得的.
   虽然刷题一直饱受诟病,大家也都褒贬不一,不过不可否认刷题确实能锻炼我们的编程能力,相信每个认真刷题的人都会有体会。LeetCode 是一个非常棒的 OJ平台,收集了许多世界范围内比如苹果,微软,facebook等公司的面试题目。相对其他 OJ 平台而言(POJ,HDU就不说了),有着下面的几个优点:

* 题目全部来自计算机业内大公司的真实面试
* 不用处理输入输出(以前是不是经常被那种行末空格,段尾换行坑了一次又一次),精力全放在写算法(函数)解决具体问题上
* 题目有丰富的讨论,可以参考别人的思路


* 精确了解自己代码在所有提交代码中运行效率的排名


* 支持多种主流语言:C/C++,Python, Java等


* 可以在线进行测试,方便调试

在 LeetCode 刷题确实收获不少,锻炼逻辑思维,写代码能力,还有算法水平,[LeetCode 刷题指南(一):为什么要刷题](http://selfboot.cn/2016/07/24/leetcode_guide_why/) 有详细的讨论。

# 不仅是代码

本仓库主要用来记录自己 LeetCode 上面 AC 的代码,其中很多效率不错(时间排名基本都是在 Top 75% 左右)。

代码中还会有简明扼要的解题思路和关键点注释,有较好的可读性。此外,一些题目还提供了多种解决方法,供对比参考。
    
当然,这里也不止是代码。LeetCode 上面题目用到的解题思想和主要的算法其实就那么几种,我对题目进行了一个简单的分类,每类题目放在一个大的目录中,问题归类详情在 (classification.md) 文件中。注意下面的几个目录:

* `Others`:一些暂时没有找到合适分类的题目;
* `ToBeOptimized`:一些解题方案需要优化的题目;
* `Combination`:一些同时用到多个解题思想的综合型题目。

你可以指出某个代码的冗余或者错误之处,也可以用更加清晰的解释来对某个代码进行注释。

你还可以完善某个分类下面问题的总结,说出你对某类问题的独到见解,总之可以做的很多。欢迎 Pull Request,让我们一起进步。
 

我也是才开始刷LeetCode上面的题,现在才十几道而已,不过我会每天坚持,希望自己能够每天进步一点点,最终会有收获的!

我的github上面的仓库地址是https://github.com/29DCH/LeetCode-ProgrammingQuestionCode,每天刷的题的代码我都会上传,也非常欢迎大家来访问互相学习交流!

题目分类如下:

# [Array](Array/)

* 026. [Remove Duplicates from Sorted Array](Array/26_RemoveDuplicatesFromSortedArray.py)
* 027. [Remove Element](Array/27_RemoveElement.py)
* 031. [Next Permutation](Array/31_NextPermutation.py)
* 041. [First Missing Positive](Array/41_FirstMissingPositive.py)
* 054. [Spiral Matrix](Array/54_SpiralMatrix.py)
* 056. [Merge Intervals](Array/56_MergeIntervals.py)
* 057. [Insert Interval](Array/57_InsertInterval.py)
* 059. [Spiral Matrix II](Array/59_SpiralMatrixII.py)
* 073. [Set Matrix Zeroes](Array/73_SetMatrixZeroes.py)
* 118. [Pascal's Triangle](Array/118_PascalTriangle.py)
* 119. [Pascal's Triangle II](Array/119_PascalTriangleII.py) 
* 164. [Maximum Gap](Array/164_MaximumGap.py)
* 189. [Rotate Array](Array/189_RotateArray.py)
* 228. [Summary Ranges](Array/228_SummaryRanges.py)
* 283. [Move Zeroes](Array/283_MoveZeroes.py)
* 289. [Game of Life](Array/289_GameOfLife.py)

# [String](String/)

* 006. [ZigZag Conversion](String/06_ZigZagConversion.py)
* 008. [String to Integer](String/08_StringtoInteger.py)
* 014. [Longest Common Prefix](String/14_LongestCommonPrefix.py)
* 017. [Letter Combinations of a Phone Number](String/17_LetterCombinationsPN.py)
* 028. [Implement strStr()](String/28_ImplementstrStr.py)
* 038. [Count and Say](String/38_CountAndSay.py)
* 058. [Length of Last Word](String/58_LengthOfLastWord.py)
* 067. [Add Binary](String/67_AddBinary.py)
* 068. [Text Justification](String/68_TextJustification.py)
* 151. [Reverse Words in a String](String/151_ReverseWordsInString.py)
* 165. [Compare Version Numbers](String/165_CompareVersionNumbers.py)
* 344. [Reverse String](String/344_ReverseString.py)

# [Linked List](LinkedList/)

* 002. [Add Two Numbers](LinkedList/02.AddTwoNumbers.py)
* 021. [Merge Two Sorted Lists](LinkedList/21_MergeTwoSortedLists.py)
* 024. [Swap Nodes in Pairs](LinkedList/24_SwapNodesInPairs.py)
* 025. [Reverse Nodes in k-Group](LinkedList/25_ReverseNodesIn-k-Group.py)
* 061. [Rotate List](LinkedList/61_RotateList.py)
* 076. [Minimum Window Substring](LinkedList/76_MinimumWindowSubstring.py)
* 082. [Remove Duplicates from Sorted List II](LinkedList/82_RemoveDuplicatesFromSortedListII.py)
* 083. [Remove Duplicates from Sorted List](LinkedList/83_RemoveDuplicatesFromSortedList.py)
* 086. [Partition List](LinkedList/86_PartitionList.py)
* 092. [Reverse Linked List II](LinkedList/92_ReverseLinkedListII.py)
* 138. [Copy List with Random Pointer](LinkedList/138_CopyListWithRandomPointer.py)
* 143. [Reorder List](LinkedList/143_ReorderList.py)
* 147. [Insertion Sort List](LinkedList/147_InsertionSortList.py)
* 148. [Sort List](LinkedList/148_SortList.py)
* 160. [Intersection of Two Linked Lists](LinkedList/160_IntersectionOfTwoLinkedLists.py)
* 203. [Remove Linked List Elements](LinkedList/203_RemoveLinkedListElements.py)
* 206. [Reverse Linked List](LinkedList/206_ReverseLinkedList.py)
* 234. [Palindrome Linked List](LinkedList/234_PalindromeLinkedList.py)
* 237. [Delete Node in a Linked List](LinkedList/237_DeleteNodeInLinkedList.py)
* 328. [Odd Even Linked List](LinkedList/328_OddEvenLinkedList.py)

# [Tree](Tree/)

* 094. [Binary Tree Inorder Traversa](Tree/94_BinaryTreeInorderTraversal.py)
* 095. [Unique Binary Search Trees II](Tree/95_UniqueBinarySearchTreesII.py)
* 096. [Unique Binary Search Trees](Tree/96_UniqueBinarySearchTrees.py)
* 099. [Recover Binary Search Tree](Tree/99_RecoverBinarySearchTree.py)
* 100. [Same Tree](Tree/100_SameTree.py)
* 105. [Construct Binary Tree from Preorder and Inorder Traversal](Tree/105_ConstructBinaryTreePreorderInorder.py)
* 106. [Construct Binary Tree from Inorder and Postorder Traversal](Tree/106_ConstructBinaryTreeInorderPostorder.py)
* 108. [Convert Sorted Array to Binary Search Tree](Tree/108_ConvertSortedArrayToBinarySearchTree.py)
* 109. [Convert Sorted List to Binary Search Tree](Tree/109_ConvertSortedListToBinarySearchTree.py)
* 110. [Balanced Binary Tree](Tree/110_BalancedBinaryTree.py)
* 111. [Minimum Depth of Binary Tree](Tree/111_MinimumDepthofBinaryTree.py)
* 112. [Path Sum](Tree/112_PathSum.py)
* 113. [Path Sum II](Tree/113_PathSumII.py)
* 114. [Flatten Binary Tree to Linked List](Tree/114_FlattenBinaryTreeToLinkedList.py)
* 116. [Populating Next Right Pointers in Each Node](Tree/116_PopulatingNextRightPointersInEachNode.py)
* 117. [Populating Next Right Pointers in Each Node II](Tree/117_PopulatingNextRightPointersInEachNodeII.py)
* 124. [Binary Tree Maximum Path Sum](Tree/124_BinaryTreeMaximumPathSum.py)
* 144. [Binary Tree Preorder Traversal](Tree/144_BinaryTreePreorderTraversal.py)
* 145. [Binary Tree Postorder Traversal](Tree/145_BinaryTreePostorderTraversal.py)
* 173. [Binary Search Tree Iterator](Tree/173_BinarySearchTreeIterator.py)
* 208. [Implement Trie (Prefix Tree)](Tree/208_ImplementTrie.py)
* 211. [Add and Search Word](211_AddandSearchWord.py)
* 226. [Invert Binary Tree](Tree/226_InvertBinaryTree.py)
* 235. [Lowest Common Ancestor of a Binary Search Tree](Tree/235_LowestCommonAncestorOfBinarySearchTree.py)
* 236. [Lowest Common Ancestor of a Binary Tree](Tree/236_LowestCommonAncestorOfBinaryTree.py)
* 297. [Serialize and Deserialize Binary Tree](Tree/297_SerializeAndDeserializeBinaryTree.py)
* 331. [Verify Preorder Serialization of a Binary Tree](Tree/331_VerifyPreorderSerializationOfBinaryTree.py)

# [Hash Table](HashTable/)

* 001. [Two Sum](HashTable/01_TwoSum.py)
* 003. [Longest Substring Without Repeating Characters](HashTable/03_LongestSubstringWithoutRepeatingCharacters.py)
* 018. `4Sum`
* 036. [Valid Sudoku](HashTable/36_ValidSudoku.py)
* 049. [Group Anagrams](HashTable/49_GroupAnagrams.py)
* 128. [Longest Consecutive Sequence](HashTable/128_LongestConsecutiveSequence.py)
* 146. [LRU Cache](HashTable/146_LRUCache_pythonic.py)
* 149. [Max Points on a Line](HashTable/149_MaxPointsOnLine.py)
* 187. [Repeated DNA Sequences](HashTable/187_RepeatedDNASequences.py)
* 205. [Isomorphic Strings](HashTable/205_IsomorphicStrings.py)
* 217. [Contains Duplicate](HashTable/217_ContainsDuplicate.py)
* 219. [Contains Duplicate II](working/219_ContainsDuplicateII.py)
* 242. [Valid Anagram](HashTable/242_ValidAnagram.py)
* 257. [Binary Tree Paths](DepthFirstSearch/257_BinaryTreePaths.py)
* 274. [H-Index](HashTable/274_H-Index.py)
* 290. [Word Pattern](HashTable/290_WordPattern.py)
* 299. [Bulls and Cows](HashTable/299_BullsAndCows.py)
* 349. [Intersection of Two Arrays](HashTable/349_IntersectionOfTwoArrays.py)
* 350. [Intersection of Two Arrays II](HashTable/350_IntersectionOfTwoArraysII.py)

# [Heap](Heap/)
* 023. [Merge k Sorted Lists](Heap/23_MergeKSortedLists.py)
* 295. [Find Median from Data Stream](Heap/295_FindMedianFromDataStream.py)
* 347. [Top K Frequent Elements](Heap/347_TopKFrequentElements.py)

# [Binary Search](BinarySearch/)

* 004. [Median of Two Sorted Arrays](BinarySearch/4_MedianOfTwoSortedArrays.py)
* 033. [Search in Rotated Sorted Array](BinarySearch/33_SearchInRotatedSortedArray.py)
* 034. [Search for a Range](BinarySearch/34_SearchForRange.py)
* 069. [Sqrt(x)](BinarySearch/69_Sqrt_x.py)
* 074. [Search a 2D Matrix](BinarySearch/74_Search2DMatrix.py)
* 081. [Search in Rotated Sorted Array II](BinarySearch/81_SearchInRotatedSortedArrayII.py)
* 153. [Find Minimum in Rotated Sorted Array](BinarySearch/153_FindMinimumInRotatedSortedArray.py)
* 154. [Find Minimum in Rotated Sorted Array II](BinarySearch/154_FindMinimumInRotatedSortedArrayII.py)
* 162. [Find Peak Element](BinarySearch/162_FindPeakElement.py)
* 222. [Count Complete Tree Nodes](BinarySearch/222_CountCompleteTreeNodes.py)
* 230. [Kth Smallest Element in a BST](working/230_KthSmallestElementInBST.py)
* 275. [H-Index II](BinarySearch/275_H-IndexII.py)
* 278. [First Bad Version](BinarySearch/278_FirstBadVersion.py)
* 367. [Valid Perfect Square](BinarySearch/367_ValidPerfectSquare.py)

# [Depth-first Search](DepthFirstSearch/)

* 098. [Validate Binary Search Tree](DepthFirstSearch/98_ValidateBinarySearchTree.py)
* 126. [Word Ladder II](DepthFirstSearch/126_WordLadderII.py)
* 129. [Sum Root to Leaf Numbers](DepthFirstSearch/129_SumRootToLeafNumbers.py)
* 140. [Word Break II](DepthFirstSearch/140_WordBreakII.py)
* 200. [Number of Islands](DepthFirstSearch/200_NumberofIslands.py)
* 301. [Remove Invalid Parentheses](DepthFirstSearch/301_RemoveInvalidParentheses.py)
* 306. [Additive Number](DepthFirstSearch/306_AdditiveNumber.py)

# [Breadth-first Search](BreadthFirstSearch/)

* 102. [Binary Tree Level Order Traversal](BreadthFirstSearch/102_BinaryTreeLevelOrderTraversal.py)
* 103. [Binary Tree Zigzag Level OrderTraversal](BreadthFirstSearch/103_BinaryTreeZigzagLevelOrderTraversal.py)
* 104. [Maximum Depth Of BinaryTree](BreadthFirstSearch/104_MaximumDepthOfBinaryTree.py)
* 107. [Binary Tree Level Order Traversal II](BreadthFirstSearch/107_BinaryTreeLevelOrderTraversalII.py)
* 126. [Word Ladder II](BreadthFirstSearch/126_WordLadderII.py)
* 127. [Word Ladder](BreadthFirstSearch/127_WordLadder.py)
* 130. [Surrounded Regions](BreadthFirstSearch/130_SurroundedRegions.py)
* 199. [Binary Tree Right Side View](BreadthFirstSearch/199_BinaryTreeRightSideView.py)
* 310. [Minimum Height Trees](BreadthFirstSearch/310_MinimumHeightTrees.py)
* 322. [Coin Change](BreadthFirstSearch/322_CoinChange.py)

# [Backtracking](Backtracking/)

* 022. [Generate Parentheses](Backtracking/23_GenerateParentheses.py)
* 039. [Combination Sum](Backtracking/39_CombinationSum.py)
* 046. [Permutations](Backtracking/46_Permutations.py) 
* 047. [Permutations II](Backtracking/47_PermutationsII.py)
* 051. [N-Queens](Backtracking/51_NQueens.py)
* 052. [N-Queens II](Backtracking/52_NQueensII.py)
* 079. [Word Search](Backtracking/79_WordSearch.py)
* 090. [Subsets II](Backtracking/90_SubsetsII.py)
* 093. [Restore IP Addresses](Backtracking/93_RestoreIPAddresses.py)
* 131. [Palindrome Partitioning](Backtracking/131_PalindromePartitioning.py)
* 216. [Combination Sum III](Backtracking/216_CombinationSumIII.py)

# [Recursion](Recursion/)

* 060. Permutation Sequence
* 077. [Combinations](Recursion/77_Combinations.py)
* 089. [Gray Code](Recursion/89_GrayCode.py)
* 101. [Symmetric Tree](Recursion/101_SymmetricTree.py)


# [Dynamic Programming](DynamicProgramming/)

* 010. [Regular Expression Matching](DynamicProgramming/10_RegularExpressionMatching.py)
* 032. [Longest Valid Parentheses](DynamicProgramming/32_LongestValidParentheses.py)
* 044. [Wildcard Matching](DynamicProgramming/44_WildcardMatching.py)
* 053. [Maximum Subarray](DynamicProgramming/53_MaximumSubarray.py)
* 062. [Unique Paths](DynamicProgramming/62_UniquePaths.py)
* 063. [Unique Paths II](DynamicProgramming/63_UniquePathsII.py)
* 064. [Minimum Path Sum](DynamicProgramming/64_MinimumPathSum.cpp)
* 070. [Climbing Stairs](DynamicProgramming/70_ClimbingStairs.py)
* 072. [Edit Distance](DynamicProgramming/72_EditDistance.py)
* 087. [Scramble String](DynamicProgramming/87_ScrambleString.py)
* 091. [Decode Ways](DynamicProgramming/91_DecodeWays.py)
* 097. [Interleaving String](DynamicProgramming/97_InterleavingString.py)
* 115. [Distinct Subsequences](DynamicProgramming/115_DistinctSubsequences.py)
* 120. [Triangle](DynamicProgramming/120_Triangle.py)
* 121. [Best Time to Buy and Sell Stock](DynamicProgramming/121_BestTimeToBuyAndSellStock.py)
* 123. [Best Time to Buy and Sell Stock III](DynamicProgramming/123_BestTimeToBuyAndSellStockIII.py)
* 132. [Palindrome Partitioning II](DynamicProgramming/132_PalindromePartitioningII.py)
* 135. [Candy](DynamicProgramming/135_Candy.py)
* 139. [Word Break](DynamicProgramming/139_WordBreak.py)
* 152. [Maximum Product Subarray](working/152_MaximumProductSubarray.py)
* 174. [Dungeon Game](DynamicProgramming/174_DungeonGame.py)
* 188. [Best Time to Buy and Sell Stock IV](DynamicProgramming/188_BestTimeBuySellStockIV.py)
* 198. [House Robber](DynamicProgramming/198_HouseRobber.py)
* 213. [House Robber II](DynamicProgramming/213_HouseRobberII.py)
* 221. [Maximal Square](DynamicProgramming/221_MaximalSquare.py)
* 264. [Ugly Number II](DynamicProgramming/264_UglyNumberII.py)
* 279. [Perfect Squares](DynamicProgramming/279_PerfectSquares.py)
* 303. [Range Sum Query - Immutable](DynamicProgramming/303_RangeSumQueryImmutable.py)
* 304. [Range Sum Query 2D - Immutable](DynamicProgramming/304_RangeSumQuery2DImmutable.py)
* 309. [Best Time to Buy and Sell Stock with Cooldown](DynamicProgramming/309_BestTimeBuySellStockWithCooldown.py)
* 313. [Super Ugly Number](DynamicProgramming/313_SuperUglyNumber.py)
* 337. [House Robber III](DynamicProgramming/337_HouseRobberIII.py)
* 368. [Largest Divisible Subset](DynamicProgramming/368_LargestDivisibleSubset.py)
* 357. [Count Numbers with Unique Digits](DynamicProgramming/357_CountNumbersWithUniqueDigits.py)

# [Greedy](Greedy/)

* 045. [Jump Game II](Greedy/45_JumpGameII.py)
* 055. [Jump Game](Greedy/55_JumpGame.py)
* 122. [Best Time to Buy and Sell Stock II](Greedy/122_BestTimeToBuyAndSellStockII.py)
* 134. [Gas Station](Greedy/134_GasStation.py)
* 316. [Remove Duplicate Letters](Greedy/316_RemoveDuplicateLetters.py)
* 330. [Patching Array](Greedy/330_PatchingArray.py)

# [Stack](Stack/)

* 020. [Valid Parentheses](Stack/20_ValidParentheses.py)
* 032. [Longest Valid Parentheses](Stack/32_LongestValidParentheses.py)
* 071. [Simplify Path](Stack/71_SimplifyPath.py)
* 084. [Largest Rectangle in Histogram](Stack/84_LargestRectangleInHistogram.py)
* 085. [Maximal Rectangle](Stack/85_MaximalRectangle.py)
* 094. [Binary Tree Inorder Traversal](Stack/94_BinaryTreeInorderTraversal.py)
* 150. [Evaluate Reverse Polish Notation](Stack/150_EvaluateReversePolishNotation.py)
* 155. [Min Stack](Stack/155_MinStack.py)
* 224. [Basic Calculator](Stack/224_BasicCalculator.py)
* 225. [Implement Stack using Queues](Stack/225_ImplementStackusingQueues.py)
* 227. [Basic Calculator II](Stack/227_BasicCalculatorII.py)
* 232. [Implement Queue using Stacks](Stack/232_ImplementQueueUsingStacks.py)
* 316. [Remove Duplicate Letters](Stack/316_RemoveDuplicateLetters.py)
* 341. [Flatten Nested List Iterator](Stack/341_FlattenNestedListIterator.py)

#  [Two Pointers](TwoPointers/)

* 011. [Container With Most Water](TwoPointers/11_ContainerWithMostWater.py)
* 015. [3Sum](TwoPointers/15_3Sum.py)
* 016. [3Sum Closest](TwoPointers/16_3SumClosest.py)
* 018. [4Sum](TwoPointers/18_4Sum.py)
* 019. [Remove Nth Node From End of List](TwoPointers/19_RemoveNthNodeFromEndOfList.py)
* 042. [Trapping Rain Water](TwoPointers/42_TrappingRainWater.py)
* 075. [Sort Colors](TwoPointers/75_SortColors.py)
* 080. [Remove Duplicates from Sorted Array II](TwoPointers/80_RemoveDuplicatesArrayII.py)
* 088. [Merge Sorted Array](TwoPointers/88_MergeSortedArray.py)
* 125. [Valid Palindrome](TwoPointers/125_ValidPalindrome.py)
* 141. [Linked List Cycle](TwoPointers/141_LinkedListCycle.py)
* 142. [Linked List Cycle II](TwoPointers/142_LinkedListCycleII.py)
* 209. [Minimum Size Subarray Sum](TwoPointers/209_MinimumSizeSubarraySum.py)
* 283. [Move Zeroes](TwoPointers/283_MoveZeroes.py)
* 287. [Find the Duplicate Number](TwoPointers/287_FindTheDuplicateNumber.py)
* 345. [Reverse Vowels of a String](TwoPointers/345_ReverseVowelsOfString.py)


# [Math](Math/)

* 007. [Reverse Integer](Math/07_ReverseInteger.py)
* 009. [Palindrome Number](Math/09_PalindromeNumber.py)
* 012. [Integer to Roman](Math/12_IntegertoRoman.py)
* 013. [Roman to Integer](Math/13_RomantoInteger.py)
* 048. [Rotate Image](Math/48_RotateImage.py)
* 043. [Multiply Strings](Math/43_MultiplyStrings.py)
* 050. [Pow(x, n)](Math/50_Pow.py)
* 060. [Permutation Sequence](Math/60_PermutationSequence.py)
* 066. [Plus One](Math/66_PlusOne.py)
* 069. Sqrt(x)
* 166. [Fraction to Recurring Decimal](Math/166_FractionToRecurringDecimal.py)
* 168. [Excel Sheet Column Title](Math/168_ExcelSheetColumnTitle.py)
* 171. [Excel Sheet Column Number](Math/171_ExcelSheetColumnNumber.py)
* 172. [Factorial Trailing Zeroes](Math/172_FactorialTrailingZeroes.py)
* 179. [Largest Number](Math/179_LargestNumber.py)
* 202. [Happy Number](Math/202_HappyNumber.py)
* 204. [Count Primes](Math/204_CountPrimes.py)
* 223. [Rectangle Area](Math/223_RectangleArea.py)
* 233. [Number of Digit One](Math/233_NumberOfDigitOne.py)
* 238. [Product of Array Except Self](Math/238_ProductOfArrayExceptSelf.py)
* 258. [Add Digits](Math/258_AddDigits.py)
* 263. [Ugly Number](Math/263_UglyNumber.py)
* 273. [Integer to English Words](Math/273_IntegerToEnglishWords.py)
* 292. [Nim Game](Math/292_NimGame.py)
* 326. [Power of Three](Math/326_PowerOfThree.py)
* 319. [Bulb Switcher](Math/319_BulbSwitcher.py)
* 335. [Self Crossing](Math/335_SelfCrossing.py)
* 343. [Integer Break](Math/343_IntegerBreak.py)

# [Bit Manipulation](BitManipulation/)

* 029. [Divide Two Integers](BitManipulation/29_DivideTwoIntegers.py)
* 078. [Subsets](BitManipulation/78_Subsets.py)
* 136. [Single Number](BitManipulation/136_SingleNumber.py)
* 137. [Single Number II](BitManipulation/137_SingleNumberII.py)
* 169. [Majority Element](BitManipulation/169_MajorityElement.py)
* 190. [Reverse Bits](BitManipulation/190_ReverseBits.py)
* 191. [Number of 1 Bits](BitManipulation/191_NumberOf1Bits.py)
* 201. [Bitwise AND of Numbers Range](BitManipulation/201_BitwiseANDofNumbersRange.py)
* 231. [Power of Two](BitManipulation/231_PowerOfTwo.py)
* 260. [Single Number III](BitManipulation/260_SingleNumberIII.py)
* 268. [Missing Number](BitManipulation/268_MissingNumber.py)
* 318. [Maximum Product of Word Lengths](BitManipulation/318_MaximumProductOfWordLengths.py)
* 338. [Counting Bits](BitManipulation/338_CountingBits.py)
* 371. [Sum of Two Integers](BitManipulation/371_SumOfTwoIntegers.py)
* 342. [Power of Four](BitManipulation/342_PowerOfFour.py)

# [Graph](Graph/)

* 133. [Clone Graph](Graph/133_CloneGraph.py)
* 207. [Course Schedule](Graph/207_CourseSchedule.py)
* 210. [Course Schedule II](Graph/210_CourseScheduleII.py)

# Combination

* 030. [Substring with Concatenation of All Words](Combination/30_SubstringWithConcatenationOfAllWords.py)
* 037. [Sudoku Solver](Combination/37_SudokuSolver.py)
* 140. [Word Break II](Combination/140_WordBreakII.py)
* 146. [LRU Cache](Combination/146_LRUCache.py)
* 300. [Longest Increasing Subsequence](Combination/300_LongestIncreasingSubsequence.py)
* 324. [Wiggle Sort II](Combination/324_WiggleSortII.py)
* 329. [Longest Increasing Path in a Matrix](Combination/329_LongestIncreasingPathInMatrix.py)
* 355. [Design Twitter](Combination/355_DesignTwitter.py)

# DFA

* 065. [Valid Number](DFA/65_ValidNumber.py)

# [Divide and Conquer](DivideConquer/)

* 215. [Kth Largest Element in an Array](DivideConquer/215_KthLargestElementArray.py)
* 240. [Search a 2D Matrix II](DivideConquer/240_Search2DMatrixII.py)
* 241. [Different Ways to Add Parentheses](DivideConquer/241_DifferentWaysToAddParentheses.py)

# Others

* 220. [Contains Duplicate III](220_ContainsDuplicateIII.py)
* 229. [Majority Element II](Others/229_MajorityElementII.py)
* 239. [Sliding Window Maximum](Others/239_SlidingWindowMaximum.py)
* 284. [Peeking Iterator](Others/284_PeekingIterator.py)
* 307. [Range Sum Query - Mutable](Others/307_RangeSumQueryMutable.py)    
 

猜你喜欢

转载自blog.csdn.net/CowBoySoBusy/article/details/82559651
今日推荐