Coding Interview
424. Longest Repeating Character Replacement
Jason Yang · 04 Aug, 2026
Longest Repeating Character Replacement (LeetCode 424): why a window is valid when its length minus its most-frequent letter stays within k, solved in Java.
Coding Interview
Jason Yang · 04 Aug, 2026
Longest Repeating Character Replacement (LeetCode 424): why a window is valid when its length minus its most-frequent letter stays within k, solved in Java.
Coding Interview
Jason Yang · 04 Aug, 2026
Pacific Atlantic Water Flow (LeetCode 417): flip the flow and DFS inward from each ocean's border, then intersect the two reachable sets. Java solution.
Coding Interview
Jason Yang · 04 Aug, 2026
Sum of Two Integers (LeetCode 371): add two numbers using only XOR and AND. Here's why XOR is the sum, AND is the carry, and how the loop lands in Java.
Coding Interview
Jason Yang · 04 Aug, 2026
Top K Frequent Elements (LeetCode 347): count with a hash map, then beat the O(n log n) bound by bucketing values by frequency for an O(n) answer in Java.
Coding Interview
Jason Yang · 04 Aug, 2026
Counting Bits (LeetCode 338): why dp[i] = dp[i >> 1] + (i & 1) counts set bits in one linear pass, plus the built-in baseline it beats — in Java.