LeetCode
LeetCode 3613: Minimize Maximum Component Cost
·2 mins
LeetCode
Medium
Union-Find
Graph
Sorting
Binary-Search
LeetCode 3613 note: add edges from light to heavy; the weight when exactly k components remain is the answer, and 0 when n <= k
LeetCode 3612: Process String with Special Operations I
·2 mins
LeetCode
Medium
String
Simulation
LeetCode 3612 note: simulate the four operations with a list; put the “result is non-empty” check inside the * branch, or * gets appended as a letter
LeetCode 2410: Maximum Matching of Players With Trainers
·2 mins
LeetCode
Medium
Two-Pointers
Greedy
Sorting
Array
LeetCode 2410 note: sort both sides, then same-direction pointers match the weakest player with the smallest trainer that is good enough
LeetCode 1353: Maximum Number of Events That Can Be Attended
·2 mins
LeetCode
Medium
Heap
Greedy
Sorting
LeetCode 1353 note: each day, attend the event that ends earliest, using a min-heap of end days
LeetCode 3608: Minimum Time for K Connected Components
·2 mins
LeetCode
Medium
Union-Find
Graph
Sorting
Binary-Search
LeetCode 3608 note: add edges back from the largest time; the time of the first edge that drops the component count below k is the answer
LeetCode 3607: Power Grid Maintenance
·3 mins
LeetCode
Medium
Heap
Union-Find
Graph
Lazy-Deletion
LeetCode 3607 note: Union-Find groups, one min-heap per group, and lazy deletion for offline stations
LeetCode 3606: Coupon Code Validator
·2 mins
LeetCode
Easy
Hash-Table
String
Sorting
LeetCode 3606 note: filter valid coupons, then sort by (category order, code); character ranges must include z, Z and 9
LeetCode 3572: Maximize Y‑Sum by Picking a Triplet of Distinct X‑Values
·2 mins
LeetCode
Medium
Greedy
Hash-Map
Sorting
LeetCode 3572 note: keep the largest y for each x, then take the three largest
LeetCode 3550: Smallest Index With Digit Sum Equal to Index
·1 min
LeetCode
Easy
Math
Array
LeetCode 3550 note: check indices in increasing order, computing each digit sum; the first match is the answer
LeetCode 1979: Find Greatest Common Divisor of Array
·1 min
LeetCode
Easy
Math
Number-Theory
Gcd
Array
LeetCode 1979 note: find the minimum and maximum, then take their GCD with Euclid’s algorithm
LeetCode 721: Accounts Merge
·3 mins
LeetCode
Medium
Union-Find
LeetCode Problem Solving
LeetCode 2094: Finding 3-Digit Even Numbers
·2 mins
LeetCode
Easy
Hash-Table
Enumeration
Array
LeetCode 2094 note: enumerate the even numbers 100 to 998 instead and check that each digit needed is available; Counter subtraction keeps only positives