每日一題
一天一題 leetcode,有益身心健康。 歡迎加入Discord群一起討論。
日期
2022/11
題目列表
2022/12
題目列表
2023/1
題目列表
2023/2
題目列表
2023/3
題目列表
2023/4
題目列表
2023/5
題目列表
2023/6
題目列表
2023/7
題目列表
2023/8
題目列表
2023/9
題目列表
日期 | 題目 |
---|---|
9/1 | 338. Counting Bits |
9/2 | 2707. Extra Characters in a String |
9/3 | 62. Unique Paths |
9/4 | 141. Linked List Cycle |
9/5 | 138. Copy List with Random Pointer |
9/6 | |
9/7 | |
9/8 | |
9/9 | |
9/10 | |
9/11 | |
9/12 | |
9/13 |
30 Days of LC JavaScript Challenge
題目列表
Day | Topic | Problem |
---|---|---|
1 (5/5) | Closure | Create Hello World Function |
2 (5/6) | Closure | Counter |
3 (5/7) | Closure | Counter II |
4 (5/8) | Basic Array Transforms | Apply Transform Over Each Element in Array |
5 (5/9) | Basic Array Transforms | Filter Elements from Array |
6 (5/10) | Basic Array Transforms | Array Reduce Transformation |
7 (5/11) | Function input and Output | Function Composition |
8 (5/12) | Function input and Output | Allow One Function Call |
9 (5/13) | Function input and Output | Memoize |
10 (5/14) | Function input and Output | Curry |
11 (5/15) | Promise | Sleep |
12 (5/16) | Promise | Promise Time Limit |
13 (5/17) | Promise | Promise Pool |
14 (5/18) | Time (setTimeout) | Cache With Time Limit |
15 (5/19) | Time (setTimeout) | Debounce |
16 (5/20) | Time (setTimeout) | Throttle |
17 (5/21) | JSON / Recursion / Important Utilities | JSON Deep Equal |
18 (5/22) | JSON / Recursion / Important Utilities | Convert Object to JSON String |
19 (5/23) | JSON / Recursion / Important Utilities | Array of Objects to Matrix |
20 (5/24) | JSON / Recursion / Important Utilities | Differences Between Two Objects |
21 (5/25) | JSON / Recursion / Important Utilities | Chunk Array |
22 (5/26) | JSON / Recursion / Important Utilities | Flatten Deeply Nested Array |
23 (5/27) | This | Array Prototype Last |
24 (5/28) | This | Group By |
25 (5/29) | This | Check if Object Instance of Class |
26 (5/30) | This | Call Function with Custom Context |
27 (5/31) | Classes | Event Emitter |
28 (6/1) | Classes | Array Wrapper |
29 (6/2) | Generators | Generate Fibonacci Sequence |
30 (6/3) | Generators | Nested Array Generator |
難度
Easy
題目列表
- 20. Valid Parentheses
- 35. Search Insert Position
- 67. Add Binary
- 70. Climbing Stairs
- 100. Same Tree
- 101. Symmetric Tree
- 104. Maximum Depth of Binary Tree
- 111. Minimum Depth of Binary Tree
- 121. Best Time to Buy and Sell Stock
- 141. Linked List Cycle
- 144. Binary Tree Preorder Traversal
- 168. Excel Sheet Column Title
- 225. Implement Stack using Queues
- 226. Invert Binary Tree
- 228. Summary Ranges
- 232. Implement Queue using Stacks
- 258. Add Digits
- 290. Word Pattern
- 338. Counting Bits
- 409. Longest Palindrome
- 459. Repeated Substring Pattern
- 520. Detect Capital
- 530. Minimum Absolute Difference in BST
- 605. Can Place Flowers
- 703. Kth Largest Element in a Stream
- 704. Binary Search
- 705. Design HashSet
- 744. Find Smallest Letter Greater Than Target
- 783. Minimum Distance Between BST Nodes
- 859. Buddy Strings
- 872. Leaf-Similar Trees
- 876. Middle of the Linked List
- 938. Range Sum of BST
- 953. Verifying an Alien Dictionary
- 997. Find the Town Judge
- 1046. Last Stone Weight
- 1137. N-th Tribonacci Number
- 1207. Unique Number of Occurrences
- 1232. Check If It Is a Straight Line
- 1431. Kids With the Greatest Number of Candies
- 1470. Shuffle the Array
- 1491. Average Salary Excluding the Minimum and Maximum Salary
- 1502. Can Make Arithmetic Progression From Sequence
- 1523. Count Odd Numbers in an Interval Range
- 1539. Kth Missing Positive Number
- 1603. Design Parking System
- 1704. Determine if String Halves Are Alike
- 1732. Find the Highest Altitude
- 1768. Merge Strings Alternately
- 1822. Sign of the Product of an Array
- 2389. Longest Subsequence With Limited Sum
Medium
題目列表
- 6. Zigzag Conversion
- 17. Letter Combinations of a Phone Number
- 28. Find the Index of the First Occurrence in a String
- 36. Valid Sudoku
- 45. Jump Game II
- 46. Permutations
- 54. Spiral Matrix
- 55. Jump Game
- 57. Insert Interval
- 62. Unique Paths
- 63. Unique Paths II
- 64. Minimum Path Sum
- 71. Simplify Path
- 77. Combinations
- 79. Word Search
- 81. Search in Rotated Sorted Array II
- 86. Partition List
- 93. Restore IP Addresses
- 95. Unique Binary Search Trees II
- 97. Interleaving String
- 98. Validate Binary Search Tree
- 103. Binary Tree Zigzag Level Order Traversal
- 106. Construct Binary Tree from Inorder and Postorder Traversal
- 109. Convert Sorted List to Binary Search Tree
- 122. Best Time to Buy and Sell Stock II
- 129. Sum Root to Leaf Numbers
- 131. Palindrome Partitioning
- 133. Clone Graph
- 134. Gas Station
- 137. Single Number II
- 138. Copy List with Random Pointer
- 139. Word Break
- 142. Linked List Cycle II
- 146. LRU Cache
- 148. Sort List
- 150. Evaluate Reverse Polish Notation
- 198. House Robber
- 207. Course Schedule
- 208. Implement Trie (Prefix Tree)
- 209. Minimum Size Subarray Sum
- 211. Design Add and Search Words Data Structure
- 215. Kth Largest Element in an Array
- 279. Perfect Squares
- 309. Best Time to Buy and Sell Stock with Cooldown
- 319. Bulb Switcher
- 328. Odd Even Linked List
- 347. Top K Frequent Elements
- 371. Sum of Two Integers
- 373. Find K Pairs with Smallest Sums
- 380. Insert Delete GetRandom O(1)
- 382. Linked List Random Node
- 399. Evaluate Division
- 427. Construct Quad Tree
- 435. Non-overlapping Intervals
- 438. Find All Anagrams in a String
- 443. String Compression
- 445. Add Two Numbers II
- 451. Sort Characters By Frequency
- 452. Minimum Number of Arrows to Burst Balloons
- 486. Predict the Winner
- 491. Non-decreasing Subsequences
- 518. Coin Change II
- 540. Single Element in a Sorted Array
- 542. 01 Matrix
- 547. Number of Provinces
- 567. Permutation in String
- 646. Maximum Length of Pair Chain
- 649. Dota2 Senate
- 652. Find Duplicate Subtrees
- 662. Maximum Width of Binary Tree
- 673. Number of Longest Increasing Subsequence
- 687. Longest Univalue Path
- 688. Knight Probability in Chessboard
- 712. Minimum ASCII Delete Sum for Two Strings
- 714. Best Time to Buy and Sell Stock with Transaction Fee
- 735. Asteroid Collision
- 739. Daily Temperatures
- 767. Reorganize String
- 787. Cheapest Flights Within K Stops
- 790. Domino and Tromino Tiling
- 791. Custom Sort String
- 797. All Paths From Source to Target
- 802. Find Eventual Safe States
- 808. Soup Servings
- 837. New 21 Game
- 841. Keys and Rooms
- 852. Peak Index in a Mountain Array
- 875. Koko Eating Bananas
- 877. Stone Game
- 881. Boats to Save People
- 886. Possible Bipartition
- 894. All Possible Full Binary Trees
- 904. Fruit Into Baskets
- 907. Sum of Subarray Minimums
- 909. Snakes and Ladders
- 912. Sort an Array
- 918. Maximum Sum Circular Subarray
- 926. Flip String to Monotone Increasing
- 931. Minimum Falling Path Sum
- 934. Shortest Bridge
- 946. Validate Stack Sequences
- 958. Check Completeness of a Binary Tree
- 974. Subarray Sums Divisible by K
- 983. Minimum Cost For Tickets
- 1011. Capacity To Ship Packages Within D Days
- 1020. Number of Enclaves
- 1026. Maximum Difference Between Node and Ancestor
- 1027. Longest Arithmetic Subsequence
- 1061. Lexicographically Smallest Equivalent String
- 1091. Shortest Path in Binary Matrix
- 1129. Shortest Path with Alternating Colors
- 1140. Stone Game II
- 1143. Longest Common Subsequence
- 1146. Snapshot Array
- 1161. Maximum Level Sum of a Binary Tree
- 1162. As Far from Land as Possible
- 1218. Longest Arithmetic Subsequence of Given Difference
- 1318. Minimum Flips to Make a OR b Equal to c
- 1319. Number of Operations to Make Network Connected
- 1339. Maximum Product of Splitted Binary Tree
- 1372. Longest ZigZag Path in a Binary Tree
- 1376. Time Needed to Inform All Employees
- 1396. Design Underground System
- 1402. Reducing Dishes
- 1443. Minimum Time to Collect All Apples in a Tree
- 1456. Maximum Number of Vowels in a Substring of Given Length
- 1466. Reorder Routes to Make All Paths Lead to the City Zero
- 1472. Design Browser History
- 1493. Longest Subarray of 1's After Deleting One Element
- 1498. Number of Subsequences That Satisfy the Given Sum Condition
- 1514. Path with Maximum Probability
- 1519. Number of Nodes in the Sub-Tree With the Same Label
- 1557. Minimum Number of Vertices to Reach All Nodes
- 1615.Maximal Network Rank
- 1626. Best Team With No Conflicts
- 1657. Determine if Two Strings Are Close
- 1721. Swapping Nodes in a Linked List
- 1802. Maximum Value at a Given Index in a Bounded Array
- 1833. Maximum Ice Cream Bars
- 1834. Single-Threaded CPU
- 1870. Minimum Speed to Arrive on Time
- 1926. Nearest Exit from Entrance in Maze
- 1962. Remove Stones to Minimize the Total
- 2024. Maximize the Confusion of an Exam
- 2090. K Radius Subarray Averages
- 2101. Detonate the Maximum Bombs
- 2130. Maximum Twin Sum of a Linked List
- 2140. Solving Questions With Brainpower
- 2187. Minimum Time to Complete Trips
- 2225. Find Players With Zero or One Losses
- 2244. Minimum Rounds to Complete All Tasks
- 2256. Minimum Average Difference
- 2279. Maximum Bags With Full Capacity of Rocks
- 2300. Successful Pairs of Spells and Potions
- 2305. Fair Distribution of Cookies
- 2316. Count Unreachable Pairs of Nodes in an Undirected Graph
- 2336. Smallest Number in Infinite Set
- 2348. Number of Zero-Filled Subarrays
- 2352. Equal Row and Column Pairs
- 2359. Find Closest Node to Given Two Nodes
- 2369. Check if There is a Valid Partition For The Array
- 2390. Removing Stars From a String
- 2405. Optimal Partition of String
- 2439. Minimize Maximum of Array
- 2462. Total Cost to Hire K Workers
- 2466. Count Ways To Build Good Strings
- 2477. Minimum Fuel Cost to Report to the Capital
- 2483. Minimum Penalty for a Shop
- 2492. Minimum Score of a Path Between Two Cities
- 2498. Frog Jump II
- 2542. Maximum Subsequence Score
- 2616. Minimize the Maximum Difference of Pairs
- 2707. Extra Characters in a String
Hard
題目列表
- 23. Merge k Sorted Lists
- 68. Text Justification
- 72. Edit Distance
- 87. Scramble String
- 124. Binary Tree Maximum Path Sum
- 149. Max Points on a Line
- 239. Sliding Window Maximum
- 352. Data Stream as Disjoint Intervals
- 403. Frog Jump
- 446. Arithmetic Slices II - Subsequence
- 460. LFU Cache
- 472. Concatenated Words
- 502. IPO
- 664. Strange Printer
- 834. Sum of Distances in Tree
- 839. Similar String Groups
- 879. Profitable Schemes
- 920. Number of Music Playlists
- 956. Tallest Billboard
- 980. Unique Paths III
- 1125. Smallest Sufficient Team
- 1187. Make Array Strictly Increasing
- 1203. Sort Items by Groups Respecting Dependencies
- 1235. Maximum Profit in Job Scheduling
- 1289. Minimum Falling Path Sum II
- 1312. Minimum Insertion Steps to Make a String Palindrome
- 1326. Minimum Number of Taps to Open to Water a Garden
- 1345. Jump Game IV
- 1406. Stone Game III
- 1416. Restore The Array
- 1444. Number of Ways of Cutting a Pizza
- 1489. Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree
- 1547. Minimum Cost to Cut a Stick
- 1569. Number of Ways to Reorder Array to Get Same BST
- 1575. Count All Possible Routes
- 1579. Remove Max Number of Edges to Keep Graph Fully Traversable
- 1601. Maximum Number of Achievable Transfer Requests
- 1639. Number of Ways to Form a Target String Given a Dictionary
- 1675. Minimize Deviation in Array
- 1697. Checking Existence of Edge Length Limited Paths
- 1751. Maximum Number of Events That Can Be Attended II
- 1799. Maximize Score After N Operations
- 1857. Largest Color Value in a Directed Graph
- 1964. Find the Longest Valid Obstacle Course at Each Position
- 2141. Maximum Running Time of N Computers
- 2218. Maximum Value of K Coins From Piles
- 2246. Longest Path With Different Adjacent Characters
- 2272. Substring With Largest Variance
- 2306. Naming a Company
- 2328. Number of Increasing Paths in a Grid
- 2360. Longest Cycle in a Graph
- 2366. Minimum Replacements to Sort the Array
- 2421. Number of Good Paths
- 2444. Count Subarrays With Fixed Bounds
- 2551. Put Marbles in Bags
題型
Array
題目列表
- 35. Search Insert Position
- 36. Valid Sudoku
- 45. Jump Game II
- 46. Permutations
- 54. Spiral Matrix
- 55. Jump Game
- 57. Insert Interval
- 63. Unique Paths II
- 64. Minimum Path Sum
- 68. Text Justification
- 79. Word Search
- 81. Search in Rotated Sorted Array II
- 106. Construct Binary Tree from Inorder and Postorder Traversal
- 121. Best Time to Buy and Sell Stock
- 122. Best Time to Buy and Sell Stock II
- 134. Gas Station
- 137. Single Number II
- 139. Word Break
- 149. Max Points on a Line
- 150. Evaluate Reverse Polish Notation
- 198. House Robber
- 209. Minimum Size Subarray Sum
- 215. Kth Largest Element in an Array
- 228. Summary Ranges
- 239. Sliding Window Maximum
- 309. Best Time to Buy and Sell Stock with Cooldown
- 347. Top K Frequent Elements
- 373. Find K Pairs with Smallest Sums
- 380. Insert Delete GetRandom O(1)
- 399. Evaluate Division
- 403. Frog Jump
- 427. Construct Quad Tree
- 435. Non-overlapping Intervals
- 446. Arithmetic Slices II - Subsequence
- 452. Minimum Number of Arrows to Burst Balloons
- 472. Concatenated Words
- 486. Predict the Winner
- 491. Non-decreasing Subsequences
- 502. IPO
- 518. Coin Change II
- 540. Single Element in a Sorted Array
- 542. 01 Matrix
- 605. Can Place Flowers
- 646. Maximum Length of Pair Chain
- 673. Number of Longest Increasing Subsequence
- 704. Binary Search
- 705. Design HashSet
- 714. Best Time to Buy and Sell Stock with Transaction Fee
- 735. Asteroid Collision
- 739. Daily Temperatures
- 744. Find Smallest Letter Greater Than Target
- 839. Similar String Groups
- 852. Peak Index in a Mountain Array
- 875. Koko Eating Bananas
- 877. Stone Game
- 879. Profitable Schemes
- 881. Boats to Save People
- 904. Fruit Into Baskets
- 907. Sum of Subarray Minimums
- 909. Snakes and Ladders
- 912. Sort an Array
- 918. Maximum Sum Circular Subarray
- 931. Minimum Falling Path Sum
- 934. Shortest Bridge
- 946. Validate Stack Sequences
- 953. Verifying an Alien Dictionary
- 956. Tallest Billboard
- 974. Subarray Sums Divisible by K
- 980. Unique Paths III
- 983. Minimum Cost For Tickets
- 997. Find the Town Judge
- 1011. Capacity To Ship Packages Within D Days
- 1020. Number of Enclaves
- 1027. Longest Arithmetic Subsequence
- 1046. Last Stone Weight
- 1091. Shortest Path in Binary Matrix
- 1125. Smallest Sufficient Team
- 1140. Stone Game II
- 1146. Snapshot Array
- 1162. As Far from Land as Possible
- 1187. Make Array Strictly Increasing
- 1207. Unique Number of Occurrences
- 1218. Longest Arithmetic Subsequence of Given Difference
- 1232. Check If It Is a Straight Line
- 1289. Minimum Falling Path Sum II
- 1326. Minimum Number of Taps to Open to Water a Garden
- 1345. Jump Game IV
- 1402. Reducing Dishes
- 1406. Stone Game III
- 1431. Kids With the Greatest Number of Candies
- 1444. Number of Ways of Cutting a Pizza
- 1470. Shuffle the Array
- 1472. Design Browser History
- 1491. Average Salary Excluding the Minimum and Maximum Salary
- 1493. Longest Subarray of 1's After Deleting One Element
- 1498. Number of Subsequences That Satisfy the Given Sum Condition
- 1502. Can Make Arithmetic Progression From Sequence
- 1514. Path with Maximum Probability
- 1539. Kth Missing Positive Number
- 1547. Minimum Cost to Cut a Stick
- 1575. Count All Possible Routes
- 1601. Maximum Number of Achievable Transfer Requests
- 1626. Best Team With No Conflicts
- 1639. Number of Ways to Form a Target String Given a Dictionary
- 1675. Minimize Deviation in Array
- 1697. Checking Existence of Edge Length Limited Paths
- 1732. Find the Highest Altitude
- 1751. Maximum Number of Events That Can Be Attended II
- 1799. Maximize Score After N Operations
- 1822. Sign of the Product of an Array
- 1833. Maximum Ice Cream Bars
- 1834. Single-Threaded CPU
- 1870. Minimum Speed to Arrive on Time
- 1926. Nearest Exit from Entrance in Maze
- 1962. Remove Stones to Minimize the Total
- 1964. Find the Longest Valid Obstacle Course at Each Position
- 2024. Maximize the Confusion of an Exam
- 2090. K Radius Subarray Averages
- 2101. Detonate the Maximum Bombs
- 2140. Solving Questions With Brainpower
- 2141. Maximum Running Time of N Computers
- 2187. Minimum Time to Complete Trips
- 2218. Maximum Value of K Coins From Piles
- 2225. Find Players With Zero or One Losses
- 2244. Minimum Rounds to Complete All Tasks
- 2246. Longest Path With Different Adjacent Characters
- 2256. Minimum Average Difference
- 2272. Substring With Largest Variance
- 2279. Maximum Bags With Full Capacity of Rocks
- 2300. Successful Pairs of Spells and Potions
- 2305. Fair Distribution of Cookies
- 2306. Naming a Company
- 2328. Number of Increasing Paths in a Grid
- 2348. Number of Zero-Filled Subarrays
- 2352. Equal Row and Column Pairs
- 2366. Minimum Replacements to Sort the Array
- 2389. Longest Subsequence With Limited Sum
- 2421. Number of Good Paths
- 2439. Minimize Maximum of Array
- 2444. Count Subarrays With Fixed Bounds
- 2462. Total Cost to Hire K Workers
- 2498. Frog Jump II
- 2542. Maximum Subsequence Score
- 2551. Put Marbles in Bags
- 2616. Minimize the Maximum Difference of Pairs
- 2707. Extra Characters in a String
Linked List
題目列表
- 23. Merge k Sorted Lists
- 86. Partition List
- 109. Convert Sorted List to Binary Search Tree
- 138. Copy List with Random Pointer
- 141. Linked List Cycle
- 142. Linked List Cycle II
- 146. LRU Cache
- 148. Sort List
- 328. Odd Even Linked List
- 382. Linked List Random Node
- 445. Add Two Numbers II
- 460. LFU Cache
- 705. Design HashSet
- 876. Middle of the Linked List
- 1472. Design Browser History
- 2130. Maximum Twin Sum of a Linked List
Matrix
題目列表
- 36. Valid Sudoku
- 54. Spiral Matrix
- 64. Minimum Path Sum
- 79. Word Search
- 427. Construct Quad Tree
- 542. 01 Matrix
- 909. Snakes and Ladders
- 931. Minimum Falling Path Sum
- 934. Shortest Bridge
- 980. Unique Paths III
- 1020. Number of Enclaves
- 1091. Shortest Path in Binary Matrix
- 1162. As Far from Land as Possible
- 1235. Maximum Profit in Job Scheduling
- 1289. Minimum Falling Path Sum II
- 1444. Number of Ways of Cutting a Pizza
- 1721. Swapping Nodes in a Linked List
- 1926. Nearest Exit from Entrance in Maze
- 2328. Number of Increasing Paths in a Grid
- 2352. Equal Row and Column Pairs
String
題目列表
- 6. Zigzag Conversion
- 17. Letter Combinations of a Phone Number
- 20. Valid Parentheses
- 28. Find the Index of the First Occurrence in a String
- 67. Add Binary
- 68. Text Justification
- 71. Simplify Path
- 72. Edit Distance
- 87. Scramble String
- 93. Restore IP Addresses
- 97. Interleaving String
- 131. Palindrome Partitioning
- 139. Word Break
- 168. Excel Sheet Column Title
- 208. Implement Trie (Prefix Tree)
- 211. Design Add and Search Words Data Structure
- 290. Word Pattern
- 409. Longest Palindrome
- 438. Find All Anagrams in a String
- 443. String Compression
- 451. Sort Characters By Frequency
- 472. Concatenated Words
- 459. Repeated Substring Pattern
- 520. Detect Capital
- 567. Permutation in String
- 649. Dota2 Senate
- 664. Strange Printer
- 712. Minimum ASCII Delete Sum for Two Strings
- 767. Reorganize String
- 791. Custom Sort String
- 839. Similar String Groups
- 859. Buddy Strings
- 926. Flip String to Monotone Increasing
- 953. Verifying an Alien Dictionary
- 1061. Lexicographically Smallest Equivalent String
- 1143. Longest Common Subsequence
- 1312. Minimum Insertion Steps to Make a String Palindrome
- 1396. Design Underground System
- 1416. Restore The Array
- 1456. Maximum Number of Vowels in a Substring of Given Length
- 1639. Number of Ways to Form a Target String Given a Dictionary
- 1657. Determine if Two Strings Are Close
- 1704. Determine if String Halves Are Alike
- 1768. Merge Strings Alternately
- 2024. Maximize the Confusion of an Exam
- 2246. Longest Path With Different Adjacent Characters
- 2306. Naming a Company
- 2390. Removing Stars From a String
- 2405. Optimal Partition of String
- 2483. Minimum Penalty for a Shop
- 2707. Extra Characters in a String
Math
題目列表
- 62. Unique Paths
- 67. Add Binary
- 70. Climbing Stairs
- 149. Max Points on a Line
- 150. Evaluate Reverse Polish Notation
- 168. Excel Sheet Column Title
- 258. Add Digits
- 279. Perfect Squares
- 319. Bulb Switcher
- 371. Sum of Two Integers
- 380. Insert Delete GetRandom O(1)
- 382. Linked List Random Node
- 445. Add Two Numbers II
- 486. Predict the Winner
- 808. Soup Servings
- 837. New 21 Game
- 877. Stone Game
- 920. Number of Music Playlists
- 1137. N-th Tribonacci Number
- 1232. Check If It Is a Straight Line
- 1140. Stone Game II
- 1406. Stone Game III
- 1523. Count Odd Numbers in an Interval Range
- 1569. Number of Ways to Reorder Array to Get Same BST
- 1799. Maximize Score After N Operations
- 1822. Sign of the Product of an Array
- 2101. Detonate the Maximum Bombs
- 2348. Number of Zero-Filled Subarrays
- 2366. Minimum Replacements to Sort the Array
Bit Manipulation
題目列表
- 67. Add Binary
- 137. Single Number II
- 338. Counting Bits
- 371. Sum of Two Integers
- 491. Non-decreasing Subsequences
- 980. Unique Paths III
- 1125. Smallest Sufficient Team
- 1318. Minimum Flips to Make a OR b Equal to c
- 1601. Maximum Number of Achievable Transfer Requests
- 1799. Maximize Score After N Operations
- 2305. Fair Distribution of Cookies
- 2306. Naming a Company
Stack/Queue
題目列表
- 20. Valid Parentheses
- 71. Simplify Path
- 144. Binary Tree Preorder Traversal
- 150. Evaluate Reverse Polish Notation
- 225. Implement Stack using Queues
- 232. Implement Queue using Stacks
- 239. Sliding Window Maximum
- 445. Add Two Numbers II
- 649. Dota2 Senate
- 735. Asteroid Collision
- 739. Daily Temperatures
- 907. Sum of Subarray Minimums
- 918. Maximum Sum Circular Subarray
- 946. Validate Stack Sequences
- 1472. Design Browser History
- 2130. Maximum Twin Sum of a Linked List
- 2390. Removing Stars From a String
- 2444. Count Subarrays With Fixed Bounds
Hash Table
題目列表
- 17. Letter Combinations of a Phone Number
- 36. Valid Sudoku
- 106. Construct Binary Tree from Inorder and Postorder Traversal
- 133. Clone Graph
- 138. Copy List with Random Pointer
- 139. Word Break
- 141. Linked List Cycle
- 142. Linked List Cycle II
- 146. LRU Cache
- 149. Max Points on a Line
- 208. Implement Trie (Prefix Tree)
- 290. Word Pattern
- 347. Top K Frequent Elements
- 380. Insert Delete GetRandom O(1)
- 409. Longest Palindrome
- 438. Find All Anagrams in a String
- 451. Sort Characters By Frequency
- 460. LFU Cache
- 767. Reorganize String
- 491. Non-decreasing Subsequences
- 567. Permutation in String
- 652. Find Duplicate Subtrees
- 705. Design HashSet
- 791. Custom Sort String
- 859. Buddy Strings
- 904. Fruit Into Baskets
- 953. Verifying an Alien Dictionary
- 974. Subarray Sums Divisible by K
- 997. Find the Town Judge
- 1027. Longest Arithmetic Subsequence
- 1146. Snapshot Array
- 1207. Unique Number of Occurrences
- 1218. Longest Arithmetic Subsequence of Given Difference
- 1345. Jump Game IV
- 1396. Design Underground System
- 1443. Minimum Time to Collect All Apples in a Tree
- 1657. Determine if Two Strings Are Close
- 1857. Largest Color Value in a Directed Graph
- 2225. Find Players With Zero or One Losses
- 2244. Minimum Rounds to Complete All Tasks
- 2306. Naming a Company
- 2336. Smallest Number in Infinite Set
- 2352. Equal Row and Column Pairs
- 2405. Optimal Partition of String
- 2707. Extra Characters in a String
Prefix Sum
題目列表
Greedy
題目列表
- 45. Jump Game II
- 55. Jump Game
- 122. Best Time to Buy and Sell Stock II
- 134. Gas Station
- 409. Longest Palindrome
- 435. Non-overlapping Intervals
- 452. Minimum Number of Arrows to Burst Balloons
- 502. IPO
- 605. Can Place Flowers
- 646. Maximum Length of Pair Chain
- 649. Dota2 Senate
- 714. Best Time to Buy and Sell Stock with Transaction Fee
- 767. Reorganize String
- 881. Boats to Save People
- 1326. Minimum Number of Taps to Open to Water a Garden
- 1402. Reducing Dishes
- 1675. Minimize Deviation in Array
- 1802. Maximum Value at a Given Index in a Bounded Array
- 1833. Maximum Ice Cream Bars
- 2141. Maximum Running Time of N Computers
- 2244. Minimum Rounds to Complete All Tasks
- 2279. Maximum Bags With Full Capacity of Rocks
- 2366. Minimum Replacements to Sort the Array
- 2389. Longest Subsequence With Limited Sum
- 2405. Optimal Partition of String
- 2439. Minimize Maximum of Array
- 2498. Frog Jump II
- 2542. Maximum Subsequence Score
- 2551. Put Marbles in Bags
- 2616. Minimize the Maximum Difference of Pairs
Backtracking
題目列表
- 17. Letter Combinations of a Phone Number
- 46. Permutations
- 77. Combinations
- 79. Word Search
- 93. Restore IP Addresses
- 95. Unique Binary Search Trees II
- 131. Palindrome Partitioning
- 491. Non-decreasing Subsequences
- 797. All Paths From Source to Target
- 980. Unique Paths III
- 1601. Maximum Number of Achievable Transfer Requests
- 1799. Maximize Score After N Operations
- 2305. Fair Distribution of Cookies
Two Pointers
題目列表
- 28. Find the Index of the First Occurrence in a String
- 86. Partition List
- 141. Linked List Cycle
- 142. Linked List Cycle II
- 443. String Compression
- 567. Permutation in String
- 876. Middle of the Linked List
- 881. Boats to Save People
- 1498. Number of Subsequences That Satisfy the Given Sum Condition
- 1721. Swapping Nodes in a Linked List
- 1768. Merge Strings Alternately
- 2130. Maximum Twin Sum of a Linked List
- 2300. Successful Pairs of Spells and Potions
- 2462. Total Cost to Hire K Workers
Sliding Window
題目列表
- 209. Minimum Size Subarray Sum
- 239. Sliding Window Maximum
- 438. Find All Anagrams in a String
- 567. Permutation in String
- 837. New 21 Game
- 904. Fruit Into Baskets
- 1456. Maximum Number of Vowels in a Substring of Given Length
- 1493. Longest Subarray of 1's After Deleting One Element
- 2024. Maximize the Confusion of an Exam
- 2090. K Radius Subarray Averages
- 2444. Count Subarrays With Fixed Bounds
Sorting
題目列表
- 148. Sort List
- 215. Kth Largest Element in an Array
- 347. Top K Frequent Elements
- 435. Non-overlapping Intervals
- 451. Sort Characters By Frequency
- 452. Minimum Number of Arrows to Burst Balloons
- 502. IPO
- 767. Reorganize String
- 791. Custom Sort String
- 881. Boats to Save People
- 912. Sort an Array
- 1235. Maximum Profit in Job Scheduling
- 1402. Reducing Dishes
- 1489. Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree
- 1491. Average Salary Excluding the Minimum and Maximum Salary
- 1498. Number of Subsequences That Satisfy the Given Sum Condition
- 1502. Can Make Arithmetic Progression From Sequence
- 1547. Minimum Cost to Cut a Stick
- 1626. Best Team With No Conflicts
- 1657. Determine if Two Strings Are Close
- 1751. Maximum Number of Events That Can Be Attended II
- 1833. Maximum Ice Cream Bars
- 1834. Single-Threaded CPU
- 2141. Maximum Running Time of N Computers
- 2225. Find Players With Zero or One Losses
- 2279. Maximum Bags With Full Capacity of Rocks
- 2300. Successful Pairs of Spells and Potions
- 2389. Longest Subsequence With Limited Sum
- 2542. Maximum Subsequence Score
- 2551. Put Marbles in Bags
Tree
題目列表
- 95. Unique Binary Search Trees II
- 98. Validate Binary Search Tree
- 100. Same Tree
- 101. Symmetric Tree
- 103. Binary Tree Zigzag Level Order Traversal
- 104. Maximum Depth of Binary Tree
- 106. Construct Binary Tree from Inorder and Postorder Traversal
- 109. Convert Sorted List to Binary Search Tree
- 111. Minimum Depth of Binary Tree
- 124. Binary Tree Maximum Path Sum
- 129. Sum Root to Leaf Numbers
- 144. Binary Tree Preorder Traversal
- 208. Implement Trie (Prefix Tree)(Trie)
- 226. Invert Binary Tree
- 427. Construct Quad Tree
- 530. Minimum Absolute Difference in BST
- 652. Find Duplicate Subtrees
- 662. Maximum Width of Binary Tree
- 687. Longest Univalue Path
- 703. Kth Largest Element in a Stream
- 783. Minimum Distance Between BST Nodes
- 834. Sum of Distances in Tree
- 872. Leaf-Similar Trees
- 894. All Possible Full Binary Trees
- 938. Range Sum of BST
- 958. Check Completeness of a Binary Tree
- 1026. Maximum Difference Between Node and Ancestor
- 1161. Maximum Level Sum of a Binary Tree
- 1339. Maximum Product of Splitted Binary Tree
- 1372. Longest ZigZag Path in a Binary Tree
- 1376. Time Needed to Inform All Employees
- 1443. Minimum Time to Collect All Apples in a Tree
- 1519. Number of Nodes in the Sub-Tree With the Same Label
- 1569. Number of Ways to Reorder Array to Get Same BST
- 2246. Longest Path With Different Adjacent Characters
- 2421. Number of Good Paths
- 2477. Minimum Fuel Cost to Report to the Capital
Heap
題目列表
- 23. Merge k Sorted Lists
- 239. Sliding Window Maximum
- 215. Kth Largest Element in an Array
- 347. Top K Frequent Elements
- 373. Find K Pairs with Smallest Sums
- 451. Sort Characters By Frequency
- 502. IPO
- 703. Kth Largest Element in a Stream
- 767. Reorganize String
- 787. Cheapest Flights Within K Stops
- 1046. Last Stone Weight
- 1514. Path with Maximum Probability
- 1675. Minimize Deviation in Array
- 1834. Single-Threaded CPU
- 1962. Remove Stones to Minimize the Total
- 2336. Smallest Number in Infinite Set
- 2462. Total Cost to Hire K Workers
- 2542. Maximum Subsequence Score
- 2551. Put Marbles in Bags
Binary Search
題目列表
- 35. Search Insert Position
- 81. Search in Rotated Sorted Array II
- 98. Validate Binary Search Tree
- 209. Minimum Size Subarray Sum
- 352. Data Stream as Disjoint Intervals
- 540. Single Element in a Sorted Array
- 704. Binary Search
- 744. Find Smallest Letter Greater Than Target
- 852. Peak Index in a Mountain Array
- 875. Koko Eating Bananas
- 938. Range Sum of BST
- 1011. Capacity To Ship Packages Within D Days
- 1027. Longest Arithmetic Subsequence
- 1146. Snapshot Array
- 1187. Make Array Strictly Increasing
- 1235. Maximum Profit in Job Scheduling
- 1498. Number of Subsequences That Satisfy the Given Sum Condition
- 1539. Kth Missing Positive Number
- 1751. Maximum Number of Events That Can Be Attended II
- 1802. Maximum Value at a Given Index in a Bounded Array
- 1870. Minimum Speed to Arrive on Time
- 1964. Find the Longest Valid Obstacle Course at Each Position
- 2024. Maximize the Confusion of an Exam
- 2141. Maximum Running Time of N Computers
- 2187. Minimum Time to Complete Trips
- 2300. Successful Pairs of Spells and Potions
- 2389. Longest Subsequence With Limited Sum
- 2439. Minimize Maximum of Array
- 2498. Frog Jump II
- 2616. Minimize the Maximum Difference of Pairs
BFS/DFS
題目列表
- 98. Validate Binary Search Tree
- 100. Same Tree
- 101. Symmetric Tree
- 103. Binary Tree Zigzag Level Order Traversal
- 104. Maximum Depth of Binary Tree
- 111. Minimum Depth of Binary Tree
- 124. Binary Tree Maximum Path Sum
- 129. Sum Root to Leaf Numbers
- 133. Clone Graph
- 144. Binary Tree Preorder Traversal
- 207. Course Schedule
- 211. Design Add and Search Words Data Structure
- 226. Invert Binary Tree
- 399. Evaluate Division
- 472. Concatenated Words
- 530. Minimum Absolute Difference in BST
- 542. 01 Matrix
- 547. Number of Provinces
- 652. Find Duplicate Subtrees
- 662. Maximum Width of Binary Tree
- 687. Longest Univalue Path
- 783. Minimum Distance Between BST Nodes
- 787. Cheapest Flights Within K Stops
- 797. All Paths From Source to Target
- 802. Find Eventual Safe States
- 834. Sum of Distances in Tree
- 839. Similar String Groups
- 841. Keys and Rooms
- 872. Leaf-Similar Trees
- 886. Possible Bipartition
- 909. Snakes and Ladders
- 934. Shortest Bridge
- 938. Range Sum of BST
- 958. Check Completeness of a Binary Tree
- 1020. Number of Enclaves
- 1026. Maximum Difference Between Node and Ancestor
- 1091. Shortest Path in Binary Matrix
- 1129. Shortest Path with Alternating Colors
- 1161. Maximum Level Sum of a Binary Tree
- 1162. As Far from Land as Possible
- 1203. Sort Items by Groups Respecting Dependencies
- 1319. Number of Operations to Make Network Connected
- 1339. Maximum Product of Splitted Binary Tree
- 1345. Jump Game IV
- 1372. Longest ZigZag Path in a Binary Tree
- 1376. Time Needed to Inform All Employees
- 1443. Minimum Time to Collect All Apples in a Tree
- 1466. Reorder Routes to Make All Paths Lead to the City Zero
- 1519. Number of Nodes in the Sub-Tree With the Same Label
- 1926. Nearest Exit from Entrance in Maze
- 1971. Find if Path Exists in Graph
- 2101. Detonate the Maximum Bombs
- 2246. Longest Path With Different Adjacent Characters
- 2316. Count Unreachable Pairs of Nodes in an Undirected Graph
- 2328. Number of Increasing Paths in a Grid
- 2359. Find Closest Node to Given Two Nodes
- 2360. Longest Cycle in a Graph
- 2477. Minimum Fuel Cost to Report to the Capital
- 2492. Minimum Score of a Path Between Two Cities
Divide and Conquer
題目列表
Dynamic Programming
題目列表
- 45. Jump Game II
- 55. Jump Game
- 62. Unique Paths
- 63. Unique Paths II
- 64. Minimum Path Sum
- 70. Climbing Stairs
- 72. Edit Distance
- 87. Scramble String
- 95. Unique Binary Search Trees II
- 97. Interleaving String
- 121. Best Time to Buy and Sell Stock
- 122. Best Time to Buy and Sell Stock II
- 124. Binary Tree Maximum Path Sum
- 131. Palindrome Partitioning
- 139. Word Break
- 198. House Robber
- 279. Perfect Squares
- 309. Best Time to Buy and Sell Stock with Cooldown
- 338. Counting Bits
- 403. Frog Jump
- 435. Non-overlapping Intervals
- 446. Arithmetic Slices II - Subsequence
- 472. Concatenated Words
- 486. Predict the Winner
- 518. Coin Change II
- 542. 01 Matrix
- 646. Maximum Length of Pair Chain
- 664. Strange Printer
- 673. Number of Longest Increasing Subsequence
- 688. Knight Probability in Chessboard
- 712. Minimum ASCII Delete Sum for Two Strings
- 714. Best Time to Buy and Sell Stock with Transaction Fee
- 787. Cheapest Flights Within K Stops
- 790. Domino and Tromino Tiling
- 808. Soup Servings
- 834. Sum of Distances in Tree
- 837. New 21 Game
- 877. Stone Game
- 879. Profitable Schemes
- 894. All Possible Full Binary Trees
- 907. Sum of Subarray Minimums
- 918. Maximum Sum Circular Subarray
- 920. Number of Music Playlists
- 926. Flip String to Monotone Increasing
- 931. Minimum Falling Path Sum
- 956. Tallest Billboard
- 983. Minimum Cost For Tickets
- 1027. Longest Arithmetic Subsequence
- 1125. Smallest Sufficient Team
- 1137. N-th Tribonacci Number
- 1140. Stone Game II
- 1143. Longest Common Subsequence
- 1162. As Far from Land as Possible
- 1187. Make Array Strictly Increasing
- 1218. Longest Arithmetic Subsequence of Given Difference
- 1235. Maximum Profit in Job Scheduling
- 1289. Minimum Falling Path Sum II
- 1312. Minimum Insertion Steps to Make a String Palindrome
- 1326. Minimum Number of Taps to Open to Water a Garden
- 1372. Longest ZigZag Path in a Binary Tree
- 1402. Reducing Dishes
- 1406. Stone Game III
- 1416. Restore The Array
- 1444. Number of Ways of Cutting a Pizza
- 1493. Longest Subarray of 1's After Deleting One Element
- 1547. Minimum Cost to Cut a Stick
- 1569. Number of Ways to Reorder Array to Get Same BST
- 1575. Count All Possible Routes
- 1626. Best Team With No Conflicts
- 1639. Number of Ways to Form a Target String Given a Dictionary
- 1751. Maximum Number of Events That Can Be Attended II
- 1799. Maximize Score After N Operations
- 1857. Largest Color Value in a Directed Graph
- 2140. Solving Questions With Brainpower
- 2218. Maximum Value of K Coins From Piles
- 2272. Substring With Largest Variance
- 2305. Fair Distribution of Cookies
- 2328. Number of Increasing Paths in a Grid
- 2369. Check if There is a Valid Partition For The Array
- 2439. Minimize Maximum of Array
- 2466. Count Ways To Build Good Strings
- 2707. Extra Characters in a String
Graph
題目列表
- 133. Clone Graph
- 207. Course Schedule
- 399. Evaluate Division
- 547. Number of Provinces
- 787. Cheapest Flights Within K Stops
- 797. All Paths From Source to Target
- 802. Find Eventual Safe States
- 834. Sum of Distances in Tree
- 841. Keys and Rooms
- 886. Possible Bipartition
- 997. Find the Town Judge
- 1129. Shortest Path with Alternating Colors
- 1203. Sort Items by Groups Respecting Dependencies
- 1319. Number of Operations to Make Network Connected
- 1466. Reorder Routes to Make All Paths Lead to the City Zero
- 1489. Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree
- 1514. Path with Maximum Probability
- 1557. Minimum Number of Vertices to Reach All Nodes
- 1579. Remove Max Number of Edges to Keep Graph Fully Traversable
- 1615.Maximal Network Rank
- 1697. Checking Existence of Edge Length Limited Paths
- 1857. Largest Color Value in a Directed Graph
- 1971. Find if Path Exists in Graph
- 2101. Detonate the Maximum Bombs
- 2246. Longest Path With Different Adjacent Characters
- 2316. Count Unreachable Pairs of Nodes in an Undirected Graph
- 2328. Number of Increasing Paths in a Grid
- 2359. Find Closest Node to Given Two Nodes
- 2360. Longest Cycle in a Graph
- 2421. Number of Good Paths
- 2477. Minimum Fuel Cost to Report to the Capital
- 2492. Minimum Score of a Path Between Two Cities