Original, Google-style coding problems — each with a clear statement, an example, a complete Go solution, a step-by-step explanation, and complexity analysis.
Return every unique pair of values that sums to a target, with duplicates removed. A hash-set scan that normalises and dedups pairs.
Find the longest run of distinct characters using a sliding window and a last-seen index map.
Merge overlapping intervals and total the gaps between them with a sort-then-sweep pass.
Product of all elements except self in O(n) and without division, using a prefix pass and a suffix pass.
Two-pointer water trapping in O(n)/O(1), plus how the 2D height-map variant is solved with a min-heap.
Smallest window of s covering all of t (with duplicates) via a sliding window and a need-count map.
Bucket words by their sorted-letter signature using a hash map.
More questions across Trees / Graphs, Dynamic Programming, and Heaps / Design are being added.