Skip to content

SZZhang0619/LeetCode-Diary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 

Repository files navigation

LeetCode-Diary

leetcode practice problems by java and javascript

LeetCode Problems

Array

  1. 704. Binary Search
  2. 27. Remove Element
  3. 977. Squares of a Sorted Array
  4. 209. Minimum Size Subarray Sum
  5. 59. Spiral Matrix II
  6. 1365. How Many Numbers Are Smaller Than the Current Number
  7. 941. Valid Mountain Array
  8. 1207. Unique Number of Occurrences
  9. 283. Move Zeroes
  10. 189. Rotate Array
  11. 724. Find Pivot Index
  12. 34. Find First and Last Position of Element in Sorted Array
  13. 922. Sort Array By Parity II
  14. 35. Search Insert Position
  15. 238. Product of Array Except Self
  16. 2425. Bitwise XOR of All Pairings
  17. 128. Longest Consecutive Sequence
  18. 2017. Grid Game

Math

  1. 9. Palindrome Number

Linked List

  1. 203. Remove Linked List Elements
  2. 707. Design Linked List
  3. 206. Reverse Linked List
  4. 24. Swap Nodes in Pairs
  5. 19. Remove Nth Node From End of List
  6. 142. Linked List Cycle II
  7. 234. Palindrome Linked List
  8. 143. Reorder List
  9. 141. Linked List Cycle
  10. 160. Intersection of Two Linked Lists
  11. 14. Longest Common Prefix

Hash Table

  1. 13. Roman to Integer
  2. 242. Valid Anagram
  3. 1002. Find Common Characters
  4. 349. Intersection of Two Arrays
  5. 202. Happy Number
  6. 1. Two Sum
  7. 454. 4Sum II
  8. 383. Ransom Note
  9. 15. 3Sum
  10. 205. Isomorphic Strings
  11. 217. Contains Duplicate
  12. 242. Valid Anagram
  13. 49. Group Anagrams
  14. 347. Top K Frequent Elements
  15. 2657. Find the Prefix Common Array of Two Arrays
  16. 36. Valid Sudoku

String

  1. 344. Reverse String
  2. 541. Reverse String II
  3. 151. Reverse Words in a String
  4. 459. Repeated Substring Pattern
  5. 925. Long Pressed Name
  6. 844. Backspace String Compare
  7. 2185. Counting Words With a Given Prefix
  8. 916. Word Subsets
  9. 1400. Construct K Palindrome Strings
  10. 3223. Minimum Length of String After Operations

Two Pointers

  1. 15. 3Sum
  2. 18. 4Sum

Stack、Queue、Heap (Priority Queue)

  1. 232. Implement Queue using Stacks
  2. 225. Implement Stack using Queues
  3. 20. Valid Parentheses
  4. 1047. Remove All Adjacent Duplicates In String
  5. 150. Evaluate Reverse Polish Notation
  6. 239. Sliding Window Maximum
  7. 347. Top K Frequent Elements
  8. 2116. Check if a Parentheses String Can Be Valid

Binary Tree

  1. 226. Invert Binary Tree
  2. 101. Symmetric Tree
  3. 104. Maximum Depth of Binary Tree
  4. 111. Minimum Depth of Binary Tree
  5. 222. Count Complete Tree Nodes
  6. 110. Balanced Binary Tree
  7. 257. Binary Tree Paths
  8. 404. Sum of Left Leaves
  9. 513. Find Bottom Left Tree Value
  10. 112. Path Sum
  11. 106. Construct Binary Tree from Inorder and Postorder Traversal
  12. 654. Maximum Binary Tree
  13. 617. Merge Two Binary Trees
  14. 700. Search in a Binary Search Tree
  15. 98. Validate Binary Search Tree
  16. 530. Minimum Absolute Difference in BST
  17. 501. Find Mode in Binary Search Tree
  18. 236. Lowest Common Ancestor of a Binary Tree
  19. 235. Lowest Common Ancestor of a Binary Search Tree
  20. 701. Insert into a Binary Search Tree
  21. 450. Delete Node in a BST
  22. 669. Trim a Binary Search Tree
  23. 108. Convert Sorted Array to Binary Search Tree
  24. 538. Convert BST to Greater Tree
  25. 129. Sum Root to Leaf Numbers
  26. 1382. Balance a Binary Search Tree
  27. 100. Same Tree
  28. 116. Populating Next Right Pointers in Each Node

Backtracking

  1. 77. Combinations
  2. 216. Combination Sum III
  3. 17. Letter Combinations of a Phone Number
  4. 39. Combination Sum
  5. 40. Combination Sum II
  6. 131. Palindrome Partitioning
  7. 93. Restore IP Addresses
  8. 78. Subsets
  9. 90. Subsets II
  10. 491. Non-decreasing Subsequences
  11. 46. Permutations
  12. 47. Permutations II
  13. 332. Reconstruct Itinerary
  14. 51. N-Queens
  15. 37. Sudoku Solver
  16. 52. N-Queens II

Greedy

  1. 455. Assign Cookies
  2. 376. Wiggle Subsequence
  3. 53. Maximum Subarray
  4. 122. Best Time to Buy and Sell Stock II
  5. 55. Jump Game
  6. 45. Jump Game II
  7. 1005. Maximize Sum Of Array After K Negations
  8. 134. Gas Station
  9. 135. Candy
  10. 860. Lemonade Change
  11. 406. Queue Reconstruction by Height
  12. 452. Minimum Number of Arrows to Burst Balloons
  13. 435. Non-overlapping Intervals
  14. 763. Partition Labels
  15. 56. Merge Intervals
  16. 738. Monotone Increasing Digits
  17. 968. Binary Tree Cameras
  18. 649. Dota2 Senate
  19. 1221. Split a String in Balanced Strings
  20. 2429. Minimize XOR

Dynamic Programming

  1. 509. Fibonacci Number
  2. 70. Climbing Stairs
  3. 746. Min Cost Climbing Stairs
  4. 62. Unique Paths
  5. 63. Unique Paths II
  6. 343. Integer Break
  7. 96. Unique Binary Search Trees
  8. 416. Partition Equal Subset Sum
  9. 1049. Last Stone Weight II
  10. 494. Target Sum
  11. 474. Ones and Zeroes
  12. 518. Coin Change II
  13. 377. Combination Sum IV
  14. 322. Coin Change
  15. 279. Perfect Squares
  16. 139. Word Break
  17. 198. House Robber
  18. 213. House Robber II
  19. 337. House Robber III
  20. 121. Best Time to Buy and Sell Stock
  21. 122. Best Time to Buy and Sell Stock II
  22. 123. Best Time to Buy and Sell Stock III
  23. 188. Best Time to Buy and Sell Stock IV
  24. 309. Best Time to Buy and Sell Stock with Cooldown
  25. 714. Best Time to Buy and Sell Stock with Transaction Fee
  26. 300. Longest Increasing Subsequence
  27. 674. Longest Continuous Increasing Subsequence
  28. 718. Maximum Length of Repeated Subarray
  29. 1143. Longest Common Subsequence
  30. 1035. Uncrossed Lines
  31. 53. Maximum Subarray
  32. 392. Is Subsequence
  33. 115. Distinct Subsequences
  34. 583. Delete Operation for Two Strings
  35. 72. Edit Distance
  36. 647. Palindromic Substrings
  37. 516. Longest Palindromic Subsequence
  38. 5. Longest Palindromic Substring
  39. 132. Palindrome Partitioning II
  40. 673. Number of Longest Increasing Subsequence

Monotonic Stack

  1. 739. Daily Temperatures
  2. 496. Next Greater Element I
  3. 503. Next Greater Element II
  4. 42. Trapping Rain Water
  5. 84. Largest Rectangle in Histogram

Graph

  1. 463. Island Perimeter
  2. 841. Keys and Rooms
  3. 127. Word Ladder

Union Find

  1. 684. Redundant Connection
  2. 685. Redundant Connection II

Simulation

  1. 657. Robot Return to Origin
  2. 31. Next Permutation

Bit Manipulation

  1. 1356. Sort Integers by The Number of 1 Bits
  2. 2683. Neighboring Bitwise XOR

Breadth-First Search

  1. 1368. Minimum Cost to Make at Least One Valid Path in a Grid
  2. 407. Trapping Rain Water II

Depth-First Search

  1. 802. Find Eventual Safe States

About

leetcode practice problems by java and javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published