Software Engineer's Blog

Blog posts — page 3

322. Coin Change

Coding Interview

322. Coin Change

Jason Yang · 04 Aug, 2026

Coin Change (LeetCode 322): why grabbing the biggest coin fails, and the bottom-up DP that finds the fewest coins for an amount in O(amount × coins) — in Java.

300. Longest Increasing Subsequence

Coding Interview

300. Longest Increasing Subsequence

Jason Yang · 04 Aug, 2026

Longest Increasing Subsequence (LeetCode 300): the O(n^2) DP for the intuition, then the O(n log n) patience-sorting trick with binary search, in Java.

297. Serialize and Deserialize Binary Tree

Coding Interview

297. Serialize and Deserialize Binary Tree

Jason Yang · 04 Aug, 2026

Serialize and Deserialize Binary Tree (LeetCode 297): why a preorder walk with explicit null markers round-trips any tree, coded cleanly in Java.

295. Find Median from Data Stream

Coding Interview

295. Find Median from Data Stream

Jason Yang · 04 Aug, 2026

Find Median from Data Stream (LeetCode 295): balance a max-heap and a min-heap so the median sits at the top, with O(log n) inserts in Java.