Software Engineer's Blog

Blog posts — page 10

73. Set Matrix Zeroes

Coding Interview

73. Set Matrix Zeroes

Jason Yang · 04 Aug, 2026

Set Matrix Zeroes (LeetCode 73): why an in-place mark-then-sweep needs the matrix's own first row and column as scratch, plus the O(1)-space Java code.

62. Unique Paths

Coding Interview

62. Unique Paths

Jason Yang · 04 Aug, 2026

Unique Paths (LeetCode 62): why each grid cell is the sum of the ways from above and from the left, plus the O(n)-space rolling DP solution in Java.

57. Insert Interval

Coding Interview

57. Insert Interval

Jason Yang · 04 Aug, 2026

Insert Interval (LeetCode 57): why an already-sorted list lets you insert in one linear pass — the before / merge / after sweep in Java, no sorting needed.

56. Merge Intervals

Coding Interview

56. Merge Intervals

Jason Yang · 04 Aug, 2026

Merge Intervals (LeetCode 56): sort by start, then sweep once and extend the last interval whenever the next one overlaps — the Java sort-and-merge template.

55. Jump Game

Coding Interview

55. Jump Game

Jason Yang · 04 Aug, 2026

Jump Game (LeetCode 55): why one greedy pass tracking the farthest reachable index beats the O(n^2) DP, and why a trailing zero is the real trap, in Java.