Software Engineer's Blog

Showing Posts From

LeetCode

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.

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.

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.

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.