Medium
LeetCode 3522: Calculate Score After Performing Instructions
·1 min
LeetCode
Weekly-Contest
Medium
LeetCode Problem Solving
LeetCode 2381: Shifting Letters II
·2 mins
LeetCode
Medium
Difference-Array
LeetCode Problem Solving
LeetCode 560: Subarray Sum Equals K
·3 mins
LeetCode
Daily
Medium
Prefix-Sum
LeetCode Problem Solving
LeetCode 164: Maximum Gap
·3 mins
LeetCode
Medium
Bucket-Sort
Radix-Sort
Sorting
Array
LeetCode 164 note: the maximum gap is at least the average gap, so with buckets no wider than that it lies between consecutive non-empty buckets; keep each bucket’s min and max for O(n)
LeetCode 556: Next Greater Element III
·1 min
LeetCode
Medium
Next-Permutation
LeetCode Problem Solving
LeetCode 3517: Smallest Palindromic Rearrangement I
·1 min
LeetCode
Weekly-Contest
Medium
LeetCode Problem Solving
LeetCode 1922: Count Good Numbers
·2 mins
LeetCode
Daily
Medium
LeetCode Problem Solving
LeetCode 3513: Number of Unique XOR Triplets I
·2 mins
LeetCode
Biweekly-Contest
Medium
Bit-Manipulation
Unsolved
LeetCode Problem Solving
LeetCode 3508: Implement Router
·3 mins
LeetCode
Medium
Design
Binary-Search
Queue
Hash-Map
LeetCode 3508 note: a queue for FIFO, a set for duplicates, and an increasing time list per destination queried with bisect
LeetCode 3494: Find the Minimum Amount of Time to Brew Potions
·2 mins
LeetCode
Medium
Simulation
Prefix-Sum
Array
LeetCode 3494 note: for each potion, push forward to get the last wizard’s finish time (everyone must be free), then subtract backward to get each wizard’s finish time
LeetCode 3493: Properties Graph
·2 mins
LeetCode
Medium
Graph
Dfs
Union-Find
Hash-Map
LeetCode 3493 note: convert each row to a set, compare intersection sizes pairwise to add edges, then count components
LeetCode 2487: Remove Nodes From Linked List
·1 min
LeetCode
Medium
Linked-List
Stack
Recursion
Monotonic-Stack
LeetCode 2487 note: the kept nodes are non-increasing left to right; keep a monotonic stack, pop anything smaller than the new node, then link what remains