LeetCode解题记录(C++)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011391629/article/details/83184335

由于工作原因,刷LeetCode的机会非常小了,于是整理了一下自己的解题记录。

1~100

leetcode No1. Two Sum
leetcode No2. Add Two Numbers
leetcode No3. Longest Substring Without Repeating Characters
leetcode No4. Median of Two Sorted Arrays
leetcode No5. Longest Palindromic Substring
leetcode No6. ZigZag Conversion
leetcode No7. Reverse Integer
leetcode No8. String to Integer (atoi)
leetcode No9. Palindrome Number
leetcode No10. Regular Expression Matching
leetcode No11. Container With Most Water
leetcode No12. Integer to Roman
leetcode No14. Longest Common Prefix
leetcode No15. 3Sum
leetcode No16. 3Sum Closest
leetcode No17. Letter Combinations of a Phone Number
leetcode No18. 4Sum
leetcode No19. Remove Nth Node From End of List
leetcode No20. Valid Parentheses
leetcode No21. Merge Two Sorted Lists
leetcode No22. Generate Parentheses
leetcode No23. Merge k Sorted Lists
leetcode No24. Swap Nodes in Pairs
leetcode No25. Reverse Nodes in k-Group
leetcode No26. Remove Duplicates from Sorted Array
leetcode No27. Remove Element
leetcode No28. Implement strStr()
leetcode No29. Divide Two Integers
leetcode No31. Next Permutation
leetcode No32. Longest Valid Parentheses
leetcode No33. Search in Rotated Sorted Array
leetcode No34. Search for a Range
leetcode No35. Search Insert Position
leetcode No36. Valid Sudoku
leetcode No37. Sudoku Solver
leetcode No38. Count and Say
leetcode No39. Combination Sum
leetcode No40. Combination Sum II
leetcode No41. First Missing Positive
leetcode No42. Trapping Rain Water
leetcode No43. Multiply Strings
leetcode No44. Wildcard Matching
leetcode No45. Jump Game II
leetcode No48. Rotate Image
leetcode No49. Group Anagrams
leetcode No50. Pow(x, n)
leetcode No51. N-Queens
leetcode No53. Maximum Subarray
leetcode No54. Spiral Matrix
leetcode No55. Jump Game
leetcode No56. Merge Intervals
leetcode No58. Length of Last Word
leetcode No59. Spiral Matrix II
leetcode No60. Permutation Sequence
leetcode No61. Rotate List
leetcode No62. Unique Paths
leetcode No63. Unique Paths II
leetcode No64. Minimum Path Sum
leetcode No65. Valid Number
leetcode No66. Plus One
leetcode No67. Add Binary
leetcode No69. Sqrt(x)
leetcode No70. Climbing Stairs
leetcode No71. Simplify Path
leetcode No72. Edit Distance
leetcode No73. Set Matrix Zeroes
leetcode No74. Search a 2D Matrix
leetcode No75. Sort Colors
leetcode No76. Minimum Window Substring
leetcode No77. Combinations
leetcode No78. Subsets
leetcode No79. Word Search
leetcode No80. Remove Duplicates from Sorted Array II
leetcode No81. Search in Rotated Sorted Array II
leetcode No82. Remove Duplicates from Sorted List II
leetcode No83. Remove Duplicates from Sorted List
leetcode No84. Largest Rectangle in Histogram
leetcode No85. Maximal Rectangle
leetcode No86. Partition List
leetcode No88. Merge Sorted Array
leetcode No89. Gray Code
leetcode No90. Subsets II
leetcode No91. Decode Ways
leetcode No92. Reverse Linked List II
leetcode No93. Restore IP Addresses
leetcode No94. Binary Tree Inorder Traversal
leetcode No95. Unique Binary Search Trees II
leetcode No96. Unique Binary Search Trees
leetcode No98. Validate Binary Search Tree
leetcode No99. Recover Binary Search Tree
leetcode No100. Same Tree

101~200

leetcode No101. Symmetric Tree
leetcode No102. Binary Tree Level Order Traversal
leetcode No103. Binary Tree Zigzag Level Order Traversal
leetcode No104. Maximum Depth of Binary Tree
leetcode No105. Construct Binary Tree from Preorder and Inorder Traversal
leetcode No106. Construct Binary Tree from Inorder and Postorder Traversal
leetcode No107. Binary Tree Level Order Traversal II
leetcode No108. Convert Sorted Array to Binary Search Tree
leetcode No109. Convert Sorted List to Binary Search Tree
leetcode No110. Balanced Binary Tree
leetcode No111. Minimum Depth of Binary Tree
leetcode No112. Path Sum
leetcode No113. Path Sum II
leetcode No114. Flatten Binary Tree to Linked List
leetcode No115. Distinct Subsequences
leetcode No116. Populating Next Right Pointers in Each Node
leetcode No117. Populating Next Right Pointers in Each Node II
leetcode No121. Best Time to Buy and Sell Stock
leetcode No122. Best Time to Buy and Sell Stock II
leetcode No123. Best Time to Buy and Sell Stock III
leetcode No124. Binary Tree Maximum Path Sum
leetcode No128. Longest Consecutive Sequence
leetcode No129. Sum Root to Leaf Numbers
leetcode No130. Surrounded Regions
leetcode No131. Palindrome Partitioning
leetcode No134. Gas Station
leetcode No135. Candy
leetcode No138. Copy List with Random Pointer
leetcode No139. Word Break
leetcode No141. Linked List Cycle
leetcode No142. Linked List Cycle II
leetcode No143. Reorder List
leetcode No146. LRU Cache
leetcode No147. Insertion Sort List
leetcode No148. Sort List
leetcode No149. Max Points on a Line
leetcode No150. Evaluate Reverse Polish Notation
leetcode No152. Maximum Product Subarray
leetcode No153. Find Minimum in Rotated Sorted Array
leetNode No154. Find Minimum in Rotated Sorted Array II
leetcode No155. Min Stack
leetcode No160. Intersection of Two Linked Lists
leetcode No169. Majority Element
leetcode No172. Factorial Trailing Zeroes
leetcode No187. Repeated DNA Sequences
leetcode No189.Rotate Array
leetcode No191. Number of 1 Bits
leetcode No198. House Robber
leetcode No200. Number of Islands

201~300

leetcode No201. Bitwise AND of Numbers Range
leetcode No203. Remove Linked List Elements
leetcode No204. Count Primes
leetcode No206. Reverse Linked List
leetcode No207. Course Schedule
leetcode No215. Kth Largest Element in an Array
leetcode No224. Basic Calculator
leetcode No230. Kth Smallest Element in a BST
leetcode No233. Number of Digit One
leetcode No234. Palindrome Linked List
leetcode No236. Lowest Common Ancestor of a Binary Tree
leetcode No237. Delete Node in a Linked List
leetcode No238. Product of Array Except Self
leetcode No239. Sliding Window Maximum
leetcode No258. Add Digits
leetcode No283. Move Zeroes
leetcode No292. Nim Game
leetcode No295. Find Median from Data Stream
leetcode No300. Longest Increasing Subsequence

301~400

leetcode No322. Coin Change
leetcode No328. Odd Even Linked List
leetcode No344.Reverse String Note
leetcode No367. Valid Perfect Square
leetcode No438. Find All Anagrams in a String
leetcode No486. Predict the Winner
leetcode No628. Maximum Product of Three Numbers

猜你喜欢

转载自blog.csdn.net/u011391629/article/details/83184335