String
LeetCode 17: Letter Combinations of a Phone Number
·2 mins
LeetCode
Medium
Hash-Table
String
Backtracking
LeetCode 17 note: each level handles one digit and tries its letters; an empty input returns an empty list
LeetCode 1189: Maximum Number of Balloons
·2 mins
LeetCode
Easy
Hash-Table
String
Counting
LeetCode 1189 note: each letter supports count // needed balloons, with l and o needed twice; take the minimum
LeetCode 1160: Find Words That Can Be Formed by Characters
·1 min
LeetCode
Easy
Array
Hash-Table
String
Counting
LeetCode 1160 note: a word is formable when none of its character counts exceeds chars’; sum the lengths of such words
LeetCode 1108: Defanging an IP Address
·1 min
LeetCode
Easy
String
LeetCode 1108 note: replace every . with [.]
LeetCode 1078: Occurrences After Bigram
·1 min
LeetCode
Easy
String
LeetCode 1078 note: split into words and check every three consecutive words, collecting the third when the first two match
LeetCode 1047: Remove All Adjacent Duplicates In String
·1 min
LeetCode
Easy
String
Stack
LeetCode 1047 note: if the stack top equals the current character both vanish, otherwise push it; after a removal the new top may cancel with the next character
LeetCode 1021: Remove Outermost Parentheses
·1 min
LeetCode
Easy
String
Stack
Bracket-Sequences
LeetCode 1021 note: track depth instead of a stack; the ‘(’ raising depth from 0 to 1 and the ‘)’ lowering it from 1 to 0 are outermost, everything else stays
LeetCode 1002: Find Common Characters
·1 min
LeetCode
Easy
Array
Hash-Table
String
LeetCode 1002 note: count each word and intersect all Counters (minimum count per character), then expand
LeetCode 953: Verifying an Alien Dictionary
·2 mins
LeetCode
Easy
Array
Hash-Table
String
LeetCode 953 note: map letters to their alien index and compare each adjacent pair at the first differing character; with no difference, the shorter must come first
LeetCode 944: Delete Columns to Make Sorted
·1 min
LeetCode
Easy
Array
String
Longest-Increasing-Subsequence
LeetCode 944 note: take each column with zip(*strs) and count the columns that are not non-decreasing
LeetCode 942: DI String Match
·1 min
LeetCode
Easy
Array
Two-Pointers
String
Greedy
LeetCode 942 note: two pointers hold the smallest and largest unused values; place the smallest on I and the largest on D
LeetCode 929: Unique Email Addresses
·2 mins
LeetCode
Easy
Array
Hash-Table
String
LeetCode 929 note: split at @, normalize only the local part (drop everything after +, remove dots), rejoin with the domain and collect in a set