Software Engineer's Blog

Showing Posts From

Hard

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.

269. Alien Dictionary

Coding Interview

269. Alien Dictionary

Jason Yang · 04 Aug, 2026

Alien Dictionary (LeetCode 269): turn a sorted word list into a character graph, then topologically sort it with Kahn's BFS in Java — cycles and prefixes included.

212. Word Search II

Coding Interview

212. Word Search II

Jason Yang · 04 Aug, 2026

Word Search II (LeetCode 212): why one shared Trie beats running Word Search once per word, plus the backtracking DFS and pruning tricks, in Java.

124. Binary Tree Maximum Path Sum

Coding Interview

124. Binary Tree Maximum Path Sum

Jason Yang · 04 Aug, 2026

Binary Tree Maximum Path Sum (LeetCode 124): why one DFS returns a single-branch gain to the parent while tracking a global best that bends through a node.

23. Merge k Sorted Lists

Coding Interview

23. Merge k Sorted Lists

Jason Yang · 04 Aug, 2026

Merge k Sorted Lists (LeetCode 23): why merging one list at a time is O(n·k), and how a min-heap or pairwise merging cuts it to O(n log k) in Java.

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.