Easy
LeetCode 3545: Minimum Deletions for At Most K Distinct Characters
·1 min
LeetCode
Easy
Greedy
Hash-Table
String
Sorting
Counting
LeetCode 3545 note: reducing the number of kinds means deleting whole kinds, starting from the least frequent
LeetCode 1550: Three Consecutive Odds
·1 min
LeetCode
Easy
Array
LeetCode Problem Solving
LeetCode 3541: Find Most Frequent Vowel and Consonant
·1 min
LeetCode
Easy
Hash-Table
String
Counting
LeetCode 3541 note: count characters, take the maximum among vowels and among consonants and add them; a missing class counts as 0
LeetCode 1920: Build Array from Permutation
·1 min
LeetCode
Easy
Array
Simulation
LeetCode 1920 note: follow the definition ans[i] = nums[nums[i]]; for O(1) extra space, stack the new value times n on top of the old one
LeetCode 3536: Maximum Product of Two Digits
·2 mins
LeetCode
Easy
Math
Sorting
LeetCode 3536 note: multiply the largest and second-largest digits; when a new maximum appears, the old maximum must move to second place
LeetCode 1399: Count Largest Group
·1 min
LeetCode
Daily
Easy
Hash-Map
LeetCode Problem Solving
LeetCode 2325: Decode the Message
·1 min
LeetCode
Daily
Easy
Hash-Map
LeetCode Problem Solving
LeetCode 724: Find Pivot Index
·2 mins
LeetCode
Daily
Easy
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 1534: Count Good Triplets
·3 mins
LeetCode
Daily
Easy
Prefix-Sum
LeetCode Problem Solving
LeetCode 3516: Find Closest Person
·1 min
LeetCode
Weekly-Contest
Easy
LeetCode Problem Solving