我将LeetCode算法题按照标签整理了一些解题思路,下面会分别给出链接方便查看。同时,还我还贴出了一些刷题过程中记录的一些笔记。
- Array
- BackTracking
- Binary Search
- Dynamic Programming
- Graph
- HashMap
- LinkedList
- Math
- Sort
- Stack
- String
- Tree
- TwoPointers
- Note
- 1. Two Sum
- 4. Median of Two Sorted Arrays
- 18. 4Sum
- 26. Remove Duplicate from Sorted Array
- 31. Next Permutation
- 41. First Missing Positive
- 48. Rotate Image
- 53. Maximum Subarray
- 53. Spiral Matrix
- 59. Spiral Matrix II
- 88. Merge Sorted Array
- 119. Pascal's Triangle
- 120. Pascal's Triangle II
- 121. Best Time to Buy and Sell Stock(DP)
- 122. Best Time to Buy and Sell Stock II
- 167. Two Sum II - Input array is sorted
- 169. Majority Element
- 189. Rotate Array
- 206. Reverse Linked List
- 217. Contains Duplicate
- 238. Product of Array Except Self
- 268. Missing Number
- 283. Move Zeros
- 414. Third Maximum Number
- 448. Find All Number Disappeared in an Array
- 485. Max Consecutive Ones
- 532. K-diff Pairs in an Array
- 561. Array Partition I
- 566. Reshape the Matrix
- 581. Shortest Unsorted Continuous Subarray
- 605. Can Place Flowers
- 628. Maximum Product of Three Numbers
- 643. Maximum Average Subarray I
- 661. Image Smoother
- 665. Non-decreasing Array
- 674. Longest Continuous Increasing Subsequence
- 695. Max Area of Island
- 697. Degree of an Array
- 717. 1-bit and 2-bit Characters
- 724. Find Pivot Index
- 17. Letter Combinations of a Phone Number
- 22. Generate Parentheses
- 37. Sudoku Solver
- 39. Combination Sum
- 40. Combination Sum II
- 46. Permutations
- 47. Permutations II
- 60. Permutation Sequence
- 77. Combinations
- 78. Subsets
- 401. Binary Watch
- 33. Search in Rotated Sorted Array
- 34. Search for a Range
- 50. Pow(x, n)
- 278. First Bad Version
- 374. Guess Number Higher of Lower
- 475. Heaters
- 10. Regular Expression Matching
- 32. Longest Valid Parentheses
- 62. Unique Paths
- 63. Unique Paths II
- 64. Minimum Path Sum
- 70. Climbing Stairs
- 91. Decode Ways
- 198. House Robber
- 303. Range Sum Query - Immutable
- 746. Min Cost Climbing Stairs
- 30. Substring with Concatenation of All Words
- 36. Valid Sudoku
- 46. Group Anagrams
- 136. Single Number
- 202. Happy Number
- 204. Count Primes
- 205. Isomorphic Strings
- 242. Valid Anagram
- 290. Word Pattern
- 349. Intersection of Two Arrays
- 350. Intersection of Two Arrays II
- 387. First Unique Character in a String
- 389. Find the Difference
- 438. Find All Anagrams in a String
- 447. Number of Boomerangs
- 463. Island Perimeter
- 500. Keyboard Row
- 575. Distribute Candies
- 594. Longest Harmonious Subsequence
- 599. Minimum Index Sum of Two Lists
- 645. Set Mismatch
- 690. Employee Importance
- 720. Longest Word in Dictionary
- 734. Sentence Similarity
- 19. Remove Nth Node From End of List
- 21. Merge Two Sorted Lists
- 25. Reverse Nodes in k-Group
- 23. Merge k Sorted Lists
- 83. Remove Duplicates from Sorted List
- 141. Linked List Cycle
- 160. Intersection of Two Linked Lists
- 203. Remove Linked List Elements
- 234. Palindrome Linked List
- 237. Delete Node in a Linked List
- 445. Add Two Numbers II
- 725. Split Linked List in Parts
- 2. Add Two Numbers
- 7. Reverse Integer
- 9. Palindrome Number
- 13. Roman to Integer
- 43. Multiply Strings
- 67. Add Binary
- 69. Sqrt(x)
- 168. Excel Sheet Column Title
- 171. Excel Sheet Column Number
- 172. Factorial Trailing Zeroes
- 231. Power of Two
- 258. Add Digits
- 263. Ugly Number
- 326. Power of Three
- 367. Valid Perfect Square
- 400. Nth Digit
- 415. Add Strings
- 441. Arranging Coins
- 453. Minimum Moves to Equal Array Elements
- 507. Perfect Number
- 598. Range Addition II
- 633. Sum of Square Numbers
- 728. Self Dividing Numbers
- 56. Merge Intervals
- 75. Sort Colors
- 147. Insertion Sort List
- 148. Sort List
- 179. Largest Number
- 274. H-Index
- 225. Implement Stack using Queues
- 232. Implement Queue using Stacks
- 496. Next Greater Element I
- 682. Baseball Game
- 5. Longest Palindromic Substring
- 12. Integer to Roman
- 14. Longest Common Prefix
- 20. Valid Parentheses
- 38. Count and Say
- 58. Length of Last Word
- 345. Reverse Vowels of a String
- 383. Ransom Note
- 434. Number of Segments in a String
- 443. String Compression
- 459. Repeated Substring Pattern
- 520. Detect Capital
- 541. Reverse String II
- 551. Student Attendance Record I
- 557. Reverse Words in a String III
- 606. Construct String from Binary Tree
- 657. Judge Route Circle
- 680. Valid Palindrome II
- 686. Repeated String Match
- 696. Count Binary Substrings
- 744. Find Smallest Letter Greater Than Target
- 784. Letter Case Permutation
- 796. Rotate String
- 94. Binary Tree Inorder Traversal
- 95. Unique Binary Search Trees II
- 96. Unique Binary Search Trees
- 98. Validate Binary Search Tree
- 100. Same Tree
- 102. Binary Tree Level Order Traversal
- 103. Binary Tree Zigzag Level Order Traversal
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 106. Construct Binary Tree from Inorder and Postorder Traversal
- 108. Convert Sorted Array to Binary Search Tree
- 110. Balanced Binary Tree
- 111. Minimum Depth of Binary Tree
- 637. Average of Levels in Binary Tree