Software Engineer's Blog

Blog posts — page 23

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.

Understanding Java Exception Hierarchy

Programming Language

Understanding Java Exception Hierarchy

Jason Yang · 27 Nov, 2025

Understand Java's Throwable hierarchy — Error vs Exception, checked vs unchecked, and RuntimeException — to write safer error handling in production apps.

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.