LeetCode
LeetCode 2381: Shifting Letters II
·2 mins
LeetCode
Medium
Difference-Array
LeetCode Problem Solving
LeetCode 724: Find Pivot Index
·2 mins
LeetCode
Daily
Easy
Prefix-Sum
LeetCode Problem Solving
LeetCode 560: Subarray Sum Equals K
·3 mins
LeetCode
Daily
Medium
Prefix-Sum
LeetCode Problem Solving
LeetCode 303: Range Sum Query - Immutable
·1 min
LeetCode
Easy
Prefix-Sum
LeetCode Problem Solving
LeetCode 2176: Count Equal and Divisible Pairs in an Array
·1 min
LeetCode
Easy
Array
LeetCode 2176 note: n is only 100, so enumerate all pairs; the condition is equal values and the index product i * j divisible by k
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 1534: Count Good Triplets
·3 mins
LeetCode
Daily
Easy
Prefix-Sum
LeetCode Problem Solving
LeetCode 556: Next Greater Element III
·1 min
LeetCode
Medium
Next-Permutation
LeetCode Problem Solving
LeetCode 3518: Smallest Palindromic Rearrangement II
·3 mins
LeetCode
Hard
Math
Combinatorics
Counting
Hash-Table
String
LeetCode 3518 note: a palindrome is determined by its left half, so this is the k-th permutation of a multiset; try characters position by position and use permutation counts, updated in O(1), to find k’s branch
LeetCode 3517: Smallest Palindromic Rearrangement I
·1 min
LeetCode
Weekly-Contest
Medium
LeetCode Problem Solving
LeetCode 3516: Find Closest Person
·1 min
LeetCode
Weekly-Contest
Easy
LeetCode Problem Solving
LeetCode 1922: Count Good Numbers
·2 mins
LeetCode
Daily
Medium
LeetCode Problem Solving