↓Skip to main content

Medium

LeetCode 139: Word Break
·2 mins
LeetCode Medium Dynamic-Programming String
LeetCode note for Word Break, rebuilt from the original learning note
LeetCode 3914: Minimum Operations to Make Array Non Decreasing
·2 mins
LeetCode Medium Greedy Array
LeetCode 3914 note: adding x to a range raises only the difference at its left edge by x, so the answer is the sum of all drops
LeetCode 3913: Sort Vowels by Frequency
·2 mins
LeetCode Medium String Sorting Counting
LeetCode 3913 note: extract only the vowels, sort by (-count, first occurrence), and put them back into the vowel positions
LeetCode 787: Cheapest Flights Within K Stops
·3 mins
LeetCode Medium Graph Bellman-Ford Shortest-Path
LeetCode note for Cheapest Flights Within K Stops, rebuilt from the original learning note
LeetCode 740: Delete and Earn
·2 mins
LeetCode Medium Dynamic-Programming
LeetCode note for Delete and Earn, rebuilt from the original learning note
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 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 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 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 <=