Software Engineer's Blog

Showing Posts From

Coding Interview

76. Minimum Window Substring

Coding Interview

76. Minimum Window Substring

Jason Yang · 31 Mar, 2026

Minimum Window Substring (LeetCode 76): the sliding-window O(n) approach with character counts to shrink to the smallest valid window, with a visual.

3. Longest Substring Without Repeating Characters

Coding Interview

3. Longest Substring Without Repeating Characters

Jason Yang · 31 Mar, 2026

Longest Substring Without Repeating Characters (LeetCode 3): the sliding-window O(n) approach, and why the int[128] version can jump the left pointer instead of stepping — with interactive visuals.

125. Valid Palindrome

Coding Interview

125. Valid Palindrome

Jason Yang · 31 Mar, 2026

Valid Palindrome (LeetCode 125): the two-pointer O(n) check that skips non-alphanumerics in place, why it beats building a cleaned string, and the edge cases.

128. Longest Consecutive Sequence

Coding Interview

128. Longest Consecutive Sequence

Jason Yang · 30 Mar, 2026

Longest Consecutive Sequence (LeetCode 128): the hash-set O(n) trick that only counts from sequence starts, with an interactive step-by-step visual.

15. 3Sum

Coding Interview

15. 3Sum

Jason Yang · 27 Mar, 2026

3Sum (LeetCode 15): sort then two-pointer for an O(n^2) solution, why sorting unlocks it, and the three places duplicate triplets sneak in — with an interactive visualization.

11. Container With Most Water

Coding Interview

11. Container With Most Water

Jason Yang · 27 Mar, 2026

Container With Most Water (LeetCode 11): the two-pointer O(n) approach, and the short proof for why moving the shorter line never skips a better answer — with an interactive visualization.

Understanding the Two Pointers Technique

Coding Interview

Understanding the Two Pointers Technique

Jason Yang · 27 Mar, 2026

The Two Pointers technique explained with clear examples: sorted arrays, sliding windows, and linked lists — a practical guide for coding interviews.

33. Search in Rotated Sorted Array

Coding Interview

33. Search in Rotated Sorted Array

Jason Yang · 03 Dec, 2025

Search in Rotated Sorted Array (LeetCode 33): a modified O(log n) binary search that finds which half is sorted, with an interactive step visual.

Divide and Conquer (D&C): Beyond Merge Sort

Coding Interview

Divide and Conquer (D&C): Beyond Merge Sort

Jason Yang · 03 Dec, 2025

Divide and Conquer is more than Merge Sort: the 3-step design paradigm, how it differs from plain recursion, and the interview patterns that use it.

Why is Binary Search O(log n)?

Coding Interview

Why is Binary Search O(log n)?

Jason Yang · 02 Dec, 2025

Binary Search runs in O(log n) because it halves the search space every step. Here's the intuition, the math proof, and how it compares to linear search.

153. Find Minimum in Rotated Sorted Array

Coding Interview

153. Find Minimum in Rotated Sorted Array

Jason Yang · 02 Dec, 2025

Find Minimum in Rotated Sorted Array (LeetCode 153): the O(log n) binary search that locates the rotation pivot, explained step by step with examples.

152. Maximum Product Subarray

Coding Interview

152. Maximum Product Subarray

Jason Yang · 01 Dec, 2025

Maximum Product Subarray (LeetCode 152): why you track max and min together to handle negatives and zeros, and the O(n) dynamic-programming solution.

53. Maximum Subarray

Coding Interview

53. Maximum Subarray

Jason Yang · 29 Nov, 2025

Maximum Subarray (LeetCode 53): Kadane's algorithm explained as one decision — extend or restart — plus the O(n) to O(1) space drop and a full worked trace.

238. Product of Array Except Self

Coding Interview

238. Product of Array Except Self

Jason Yang · 28 Nov, 2025

Product of Array Except Self (LeetCode 238): the prefix and suffix product trick that avoids division for an O(n) solution, with an interactive visual.

Understanding Prefix and Suffix Patterns

Coding Interview

Understanding Prefix and Suffix Patterns

Jason Yang · 28 Nov, 2025

Prefix Sum and Suffix Product explained: what these algorithm terms really mean, why they beat naive recomputation, and where they show up in problems.

217. Contains Duplicate

Coding Interview

217. Contains Duplicate

Jason Yang · 27 Nov, 2025

Contains Duplicate (LeetCode 217): compare the brute-force, sorting, and hash-set approaches — and why 'just use a hash set' isn't always the right reflex.

121. Best Time to Buy and Sell Stock

Coding Interview

121. Best Time to Buy and Sell Stock

Jason Yang · 26 Nov, 2025

Best Time to Buy and Sell Stock (LeetCode 121): the single-pass O(n) solution that tracks the lowest price so far, with an interactive step-by-step visual.

1. Two Sum

Coding Interview

1. Two Sum

Jason Yang · 11 Nov, 2025

Two Sum (LeetCode 1) two ways: the brute-force O(n^2) scan vs the hash-map O(n) approach — with the intuition, edge cases, and the space-time trade-off.