Skip to content

每日一題

一天一題 leetcode,有益身心健康。 歡迎加入Discord群一起討論。

日期

2022/11

題目列表
日期題目
11/211926. Nearest Exit from Entrance in Maze
11/22279. Perfect Squares
11/2336. Valid Sudoku
148. Sort List
409. Longest Palindrome
11/2479. Word Search
11/25907. Sum of Subarray Minimums
687. Longest Univalue Path
11/261235. Maximum Profit in Job Scheduling
11/27446. Arithmetic Slices II - Subsequence
11/282225. Find Players With Zero or One Losses
11/29380. Insert Delete GetRandom O(1)
11/301207. Unique Number of Occurrences

2022/12

題目列表
日期題目
12/11704. Determine if String Halves Are Alike
371. Sum of Two Integers
12/21657. Determine if Two Strings Are Close
859. Buddy Strings
12/3451. Sort Characters By Frequency
12/42256. Minimum Average Difference
12/5876. Middle of the Linked List
12/6328. Odd Even Linked List
12/7938. Range Sum of BST
98. Validate Binary Search Tree
12/8872. Leaf-Similar Trees
12/91026. Maximum Difference Between Node and Ancestor
12/101339. Maximum Product of Splitted Binary Tree
12/11124. Binary Tree Maximum Path Sum
12/1270. Climbing Stairs
2498. Frog Jump II
12/13931. Minimum Falling Path Sum
1289. Minimum Falling Path Sum II
12/14198. House Robber
12/151143. Longest Common Subsequence
12/16232. Implement Queue using Stacks
12/17150. Evaluate Reverse Polish Notation
12/18739. Daily Temperatures
12/191971. Find if Path Exists in Graph
12/20841. Keys and Rooms
12/21886. Possible Bipartition
12/22834. Sum of Distances in Tree
12/23309. Best Time to Buy and Sell Stock with Cooldown
121. Best Time to Buy and Sell Stock
122. Best Time to Buy and Sell Stock II
12/24790. Domino and Tromino Tiling
12/252389. Longest Subsequence With Limited Sum
791. Custom Sort String
12/2655. Jump Game
12/272279. Maximum Bags With Full Capacity of Rocks
12/281962. Remove Stones to Minimize the Total
12/291834. Single-Threaded CPU
12/30797. All Paths From Source to Target
12/31980. Unique Paths III

2023/1

題目列表
日期題目
1/1290. Word Pattern
1/2520. Detect Capital
1/3944. Delete Columns to Make Sorted
1/42244. Minimum Rounds to Complete All Tasks
1/5452. Minimum Number of Arrows to Burst Balloons
1/61833. Maximum Ice Cream Bars
1/7134. Gas Station
1/8149. Max Points on a Line
1/9144. Binary Tree Preorder Traversal
1/10100. Same Tree
1/111443. Minimum Time to Collect All Apples in a Tree
1/121519. Number of Nodes in the Sub-Tree With the Same Label
1/132246. Longest Path With Different Adjacent Characters
1/141061. Lexicographically Smallest Equivalent String
1/152421. Number of Good Paths
1/1657. Insert Interval
1/17926. Flip String to Monotone Increasing
1/18918. Maximum Sum Circular Subarray
1/19974. Subarray Sums Divisible by K
1/20491. Non-decreasing Subsequences
1/2193. Restore IP Addresses
1/22131. Palindrome Partitioning
1/23997. Find the Town Judge
1/24909. Snakes and Ladders
1/252359. Find Closest Node to Given Two Nodes
1/26787. Cheapest Flights Within K Stops
1/27472. Concatenated Words
1/28352. Data Stream as Disjoint Intervals
1/29460. LFU Cache
1/301137. N-th Tribonacci Number
1/311626. Best Team With No Conflicts

2023/2

題目列表
日期題目
2/11071. Greatest Common Divisor of Strings
2/2953. Verifying an Alien Dictionary
2/36. Zigzag Conversion
2/4567. Permutation in String
2/5438. Find All Anagrams in a String
2/61470. Shuffle the Array
2/7904. Fruit Into Baskets
2/845. Jump Game II
2/92306. Naming a Company
2/101162. As Far from Land as Possible
2/111129. Shortest Path with Alternating Colors
2/122477. Minimum Fuel Cost to Report to the Capital
2/131523. Count Odd Numbers in an Interval Range
2/1467. Add Binary
2/15989. Add to Array-Form of Integer
2/16104. Maximum Depth of Binary Tree
2/17783. Minimum Distance Between BST Nodes
2/18226. Invert Binary Tree
2/19103. Binary Tree Zigzag Level Order Traversal
2/2035. Search Insert Position
2/21540. Single Element in a Sorted Array
2/221011. Capacity To Ship Packages Within D Days
2/23502. IPO
2/241675. Minimize Deviation in Array
2/25121. Best Time to Buy and Sell Stock
2/2672. Edit Distance
2/27427. Construct Quad Tree
2/28652. Find Duplicate Subtrees

2023/3

題目列表
日期題目
3/1912. Sort an Array
3/2443. String Compression
3/328. Find the Index of the First Occurrence in a String
3/42444. Count Subarrays With Fixed Bounds
3/51345. Jump Game IV
3/61539. Kth Missing Positive Number
3/72187. Minimum Time to Complete Trips
3/8875. Koko Eating Bananas
3/9142. Linked List Cycle II
3/10382. Linked List Random Node
3/11109. Convert Sorted List to Binary Search Tree
3/1223. Merge k Sorted Lists
3/13101. Symmetric Tree
3/14129. Sum Root to Leaf Numbers
3/15958. Check Completeness of a Binary Tree
3/16106. Construct Binary Tree from Inorder and Postorder Traversal
3/17208. Implement Trie (Prefix Tree)
3/181472. Design Browser History
3/19211. Design Add and Search Words Data Structure
3/20605. Can Place Flowers
3/212348. Number of Zero-Filled Subarrays
3/222492. Minimum Score of a Path Between Two Cities
3/231319. Number of Operations to Make Network Connected
3/241466. Reorder Routes to Make All Paths Lead to the City Zero
3/252316. Count Unreachable Pairs of Nodes in an Undirected Graph
3/262360. Longest Cycle in a Graph
3/2764. Minimum Path Sum
3/28983. Minimum Cost For Tickets
3/291402. Reducing Dishes
3/3087. Scramble String
3/311444. Number of Ways of Cutting a Pizza

2023/4

題目列表
日期題目
4/1704. Binary Search
4/22300. Successful Pairs of Spells and Potions
4/3881. Boats to Save People
4/42405. Optimal Partition of String
4/52439. Minimize Maximum of Array
4/61254. Number of Closed Islands
4/71020. Number of Enclaves
4/8133. Clone Graph
4/91857. Largest Color Value in a Directed Graph
4/1020. Valid Parentheses
4/112390. Removing Stars From a String
4/1271. Simplify Path
4/13946. Validate Stack Sequences
4/14516. Longest Palindromic Subsequence
4/152218. Maximum Value of K Coins From Piles
4/161639. Number of Ways to Form a Target String Given a Dictionary
4/171431. Kids With the Greatest Number of Candies
4/181768. Merge Strings Alternately
4/191372. Longest ZigZag Path in a Binary Tree
4/20662. Maximum Width of Binary Tree
4/21879. Profitable Schemes
4/221312. Minimum Insertion Steps to Make a String Palindrome
4/231416. Restore The Array
4/241046. Last Stone Weight
4/252336. Smallest Number in Infinite Set
4/26258. Add Digits
4/27319. Bulb Switcher
4/28839. Similar String Groups
4/291697. Checking Existence of Edge Length Limited Paths
4/301579. Remove Max Number of Edges to Keep Graph Fully Traversable

2023/5

題目列表
日期題目
5/11491. Average Salary Excluding the Minimum and Maximum Salary
5/21822. Sign of the Product of an Array
5/32215. Find the Difference of Two Arrays
5/4649. Dota2 Senate
5/51456. Maximum Number of Vowels in a Substring of Given Length
5/61498. Number of Subsequences That Satisfy the Given Sum Condition
5/71964. Find the Longest Valid Obstacle Course at Each Position
5/81572. Matrix Diagonal Sum
5/954. Spiral Matrix
5/1059. Spiral Matrix II
5/111035. Uncrossed Lines
5/122140. Solving Questions With Brainpower
5/132466. Count Ways To Build Good Strings
5/141799. Maximize Score After N Operations
5/151721. Swapping Nodes in a Linked List
5/1624. Swap Nodes in Pairs
5/172130. Maximum Twin Sum of a Linked List
5/181557. Minimum Number of Vertices to Reach All Nodes
5/19785. Is Graph Bipartite?
5/20399. Evaluate Division
5/21934. Shortest Bridge
5/22347. Top K Frequent Elements
5/23703. Kth Largest Element in a Stream
5/242542. Maximum Subsequence Score
5/25837. New 21 Game
5/261140. Stone Game II
877. Stone Game
5/271406. Stone Game III
5/281547. Minimum Cost to Cut a Stick
5/291603. Design Parking System
5/30705. Design HashSet
5/311396. Design Underground System

2023/6

題目列表
日期題目
6/11091. Shortest Path in Binary Matrix
6/22101. Detonate the Maximum Bombs
6/31376. Time Needed to Inform All Employees
6/4547. Number of Provinces
6/51232. Check If It Is a Straight Line
6/61502. Can Make Arithmetic Progression From Sequence
6/71318. Minimum Flips to Make a OR b Equal to c
6/81351. Count Negative Numbers in a Sorted Matrix
6/9744. Find Smallest Letter Greater Than Target
6/101802. Maximum Value at a Given Index in a Bounded Array
6/111146. Snapshot Array
6/12228. Summary Ranges
6/132352. Equal Row and Column Pairs
6/14530. Minimum Absolute Difference in BST
6/151161. Maximum Level Sum of a Binary Tree
6/161569. Number of Ways to Reorder Array to Get Same BST
6/171187. Make Array Strictly Increasing
6/182328. Number of Increasing Paths in a Grid
6/191732. Find the Highest Altitude
6/202090. K Radius Subarray Averages
6/212448. Minimum Cost to Make Array Equal
6/22714. Best Time to Buy and Sell Stock with Transaction Fee
6/231027. Longest Arithmetic Subsequence
6/24956. Tallest Billboard
6/251575. Count All Possible Routes
6/262462. Total Cost to Hire K Workers
6/27373. Find K Pairs with Smallest Sums
6/281514. Path with Maximum Probability
6/29864. Shortest Path to Get All Keys
6/301970. Last Day Where You Can Still Cross

2023/7

題目列表
日期題目
7/12305. Fair Distribution of Cookies
7/21601. Maximum Number of Achievable Transfer Requests
7/3859. Buddy Strings
7/4137. Single Number II
7/51493. Longest Subarray of 1's After Deleting One Element
7/6209. Minimum Size Subarray Sum
7/72024. Maximize the Confusion of an Exam
7/82551. Put Marbles in Bags
7/92272. Substring With Largest Variance
7/10111. Minimum Depth of Binary Tree
7/11863. All Nodes Distance K in Binary Tree
7/12802. Find Eventual Safe States
7/13207. Course Schedule
7/141218. Longest Arithmetic Subsequence of Given Difference
7/151751. Maximum Number of Events That Can Be Attended II
7/161125. Smallest Sufficient Team
7/17445. Add Two Numbers II
7/18146. LRU Cache
7/19435. Non-overlapping Intervals
7/20735. Asteroid Collision
7/21673. Number of Longest Increasing Subsequence
7/22688. Knight Probability in Chessboard
7/23894. All Possible Full Binary Trees
7/2450. Pow(x, n)
7/25852. Peak Index in a Mountain Array
7/261870. Minimum Speed to Arrive on Time
7/272141. Maximum Running Time of N Computers
7/28486. Predict the Winner
7/29808. Soup Servings
7/30664. Strange Printer
7/31712. Minimum ASCII Delete Sum for Two Strings

2023/8

題目列表
日期題目
8/177. Combinations
8/246. Permutations
8/317. Letter Combinations of a Phone Number
8/4139. Word Break
8/595. Unique Binary Search Trees II
8/6920. Number of Music Playlists
8/774. Search a 2D Matrix
8/833. Search in Rotated Sorted Array
8/92616. Minimize the Maximum Difference of Pairs
8/1081. Search in Rotated Sorted Array II
8/11518. Coin Change II
8/1263. Unique Paths II
8/132369. Check if There is a Valid Partition For The Array
8/14215. Kth Largest Element in an Array
8/1586. Partition List
8/16239. Sliding Window Maximum
8/17542. 01 Matrix
8/181615.Maximal Network Rank
8/191489. Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree
8/201203. Sort Items by Groups Respecting Dependencies
8/21459. Repeated Substring Pattern
8/22168. Excel Sheet Column Title
8/23767. Reorganize String
8/2468. Text Justification
8/2597. Interleaving String
8/26646. Maximum Length of Pair Chain
8/27403. Frog Jump
8/28225. Implement Stack using Queues
8/292483. Minimum Penalty for a Shop
8/302366. Minimum Replacements to Sort the Array
8/311326. Minimum Number of Taps to Open to Water a Garden

2023/9

題目列表
日期題目
9/1338. Counting Bits
9/22707. Extra Characters in a String
9/362. Unique Paths
9/4141. Linked List Cycle
9/5138. 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

題目列表
DayTopicProblem
1 (5/5)ClosureCreate Hello World Function
2 (5/6)ClosureCounter
3 (5/7)ClosureCounter II
4 (5/8)Basic Array TransformsApply Transform Over Each Element in Array
5 (5/9)Basic Array TransformsFilter Elements from Array
6 (5/10)Basic Array TransformsArray Reduce Transformation
7 (5/11)Function input and OutputFunction Composition
8 (5/12)Function input and OutputAllow One Function Call
9 (5/13)Function input and OutputMemoize
10 (5/14)Function input and OutputCurry
11 (5/15)PromiseSleep
12 (5/16)PromisePromise Time Limit
13 (5/17)PromisePromise 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 UtilitiesJSON Deep Equal
18 (5/22)JSON / Recursion / Important UtilitiesConvert Object to JSON String
19 (5/23)JSON / Recursion / Important UtilitiesArray of Objects to Matrix
20 (5/24)JSON / Recursion / Important UtilitiesDifferences Between Two Objects
21 (5/25)JSON / Recursion / Important UtilitiesChunk Array
22 (5/26)JSON / Recursion / Important UtilitiesFlatten Deeply Nested Array
23 (5/27)ThisArray Prototype Last
24 (5/28)ThisGroup By
25 (5/29)ThisCheck if Object Instance of Class
26 (5/30)ThisCall Function with Custom Context
27 (5/31)ClassesEvent Emitter
28 (6/1)ClassesArray Wrapper
29 (6/2)GeneratorsGenerate Fibonacci Sequence
30 (6/3)GeneratorsNested Array Generator

難度

Easy

題目列表

Medium

題目列表

Hard

題目列表

題型

Array

題目列表

Linked List

題目列表

Matrix

題目列表

String

題目列表

Math

題目列表

Bit Manipulation

題目列表

Stack/Queue

題目列表

Hash Table

題目列表

Prefix Sum

題目列表

Greedy

題目列表

Backtracking

題目列表

Two Pointers

題目列表

Sliding Window

題目列表

Sorting

題目列表

Tree

題目列表

Heap

題目列表
題目列表

BFS/DFS

題目列表

Divide and Conquer

題目列表

Dynamic Programming

題目列表

Graph

題目列表