↓Skip to main content

LeetCode

LeetCode 3909: Compare Sums of Bitonic Parts
·1 min
LeetCode Medium Array
LeetCode 3909 note: walk to the peak and sum each side; the peak belongs to both, so including it or not does not change the comparison
LeetCode 3908: Valid Digit Number
·1 min
LeetCode Easy Math
LeetCode 3908 note: convert to a string and check that it contains x but does not start with x
LeetCode 322: Coin Change
·2 mins
LeetCode Medium Dynamic-Programming Unbounded-Knapsack
LeetCode note for Coin Change, rebuilt from the original learning note
LeetCode 213: House Robber II
·2 mins
LeetCode Medium Dynamic-Programming
LeetCode note for House Robber II, rebuilt from the original learning note
LeetCode 1631: Path With Minimum Effort
·3 mins
LeetCode Medium Graph Dijkstra Shortest-Path
LeetCode note for Path With Minimum Effort, rebuilt from the original learning note
LeetCode 70: Climbing Stairs
·2 mins
LeetCode Easy Dynamic-Programming
LeetCode note for Climbing Stairs, rebuilt from the original learning note
LeetCode 3906: Count Good Integers on a Grid Path
·2 mins
LeetCode Hard Dynamic-Programming Digit-Dp
LeetCode 3906 note: the range reaches 9 × 10^15, so no per-number checks; a digit DP carries both lower and upper tight flags, plus the previous digit on the path since path cells must be non-decreasing
LeetCode 3905: Multi Source Flood Fill
·2 mins
LeetCode Medium Bfs Matrix
LeetCode 3905 note: multi-source BFS one layer at a time, collecting the maximum color per cell before writing the layer back
LeetCode 3904: Smallest Stable Index II
·1 min
LeetCode Medium Prefix-Sum Array
LeetCode 3904 note: the first index where the prefix maximum minus the suffix minimum is <= k; build the suffix minimum right to left first
LeetCode 3903: Smallest Stable Index I
·1 min
LeetCode Easy Prefix-Sum Array
LeetCode 3903 note: the first index where the prefix maximum minus the suffix minimum is <= k; build the suffix minimum right to left first
LeetCode 778: Swim in Rising Water
·3 mins
LeetCode Hard Graph Dijkstra Binary-Search
LeetCode note for Swim in Rising Water, rebuilt from the original learning note
LeetCode 1514: Path with Maximum Probability
·3 mins
LeetCode Medium Graph Dijkstra Shortest-Path Heap
LeetCode 1514 note: multiplying probabilities only shrinks them, so Dijkstra applies; prune with <=