LeetCode
LeetCode 343: Integer Break
·3 mins
LeetCode
Medium
Dynamic-Programming
LeetCode note for Integer Break, rebuilt from the original learning note
LeetCode 759: Employee Free Time
·2 mins
LeetCode
Hard
Heap
K-Way-Merge
Intervals
Sweep-Line
LeetCode 759 note: k-way merge all work intervals by start; any gap after the latest end so far is common free time
LeetCode 3919: Minimum Cost to Move Between Indices
·2 mins
LeetCode
Medium
Greedy
Prefix-Sum
Array
LeetCode 3919 note: walk one step at a time, each costing 1 (when the next index is the closest) or the gap; jumping is never cheaper, so answer queries with prefix sums
LeetCode 3918: Sum of Primes Between Number and Its Reverse
·2 mins
LeetCode
Medium
Math
Number-Theory
LeetCode 3918 note: reverse n, take the range [min, max], and sum primes by trial division; test divisibility with %, never by comparing // with /
LeetCode 3917: Count Indices With Opposite Parity
·1 min
LeetCode
Easy
Array
LeetCode 3917 note: scan right to left counting odds and evens seen; each position’s answer is the count of opposite parity to its right
LeetCode 377: Combination Sum IV
·3 mins
LeetCode
Medium
Dynamic-Programming
Unbounded-Knapsack
LeetCode note for Combination Sum IV, rebuilt from the original learning note
LeetCode 279: Perfect Squares
·3 mins
LeetCode
Medium
Dynamic-Programming
LeetCode note for Perfect Squares, rebuilt from the original learning note
LeetCode 743: Network Delay Time
·3 mins
LeetCode
Medium
Graph
Dijkstra
Shortest-Path
LeetCode note for Network Delay Time, rebuilt from the original learning note
LeetCode 55: Jump Game
·2 mins
LeetCode
Medium
Greedy
LeetCode note for Jump Game, rebuilt from the original learning note
LeetCode 45: Jump Game II
·3 mins
LeetCode
Medium
Greedy
Bfs
LeetCode note for Jump Game II, rebuilt from the original learning note
LeetCode 300: Longest Increasing Subsequence
·3 mins
LeetCode
Medium
Dynamic-Programming
Binary-Search
LeetCode note for Longest Increasing Subsequence, rebuilt from the original learning note
LeetCode 152: Maximum Product Subarray
·3 mins
LeetCode
Medium
Dynamic-Programming
LeetCode note for Maximum Product Subarray, rebuilt from the original learning note