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.
Showing Posts From
Coding Interview
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.
Coding Interview
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.
Coding Interview
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.
Coding Interview
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.
Coding Interview
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.
Coding Interview
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.
Coding Interview
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.