Coding Interview
21. Merge Two Sorted Lists
Jason Yang · 04 Aug, 2026
Merge Two Sorted Lists (LeetCode 21): the dummy-head trick that removes every empty-list special case, plus the O(1)-space splice solution in Java.
Coding Interview
Jason Yang · 04 Aug, 2026
Merge Two Sorted Lists (LeetCode 21): the dummy-head trick that removes every empty-list special case, plus the O(1)-space splice solution in Java.
Coding Interview
Jason Yang · 04 Aug, 2026
Valid Parentheses (LeetCode 20): why a stack is the natural fit for matching brackets, a clean Java solution, and the empty-stack edge cases interviewers probe.
Coding Interview
Jason Yang · 04 Aug, 2026
Remove Nth Node From End of List (LeetCode 19): why a two-pointer gap lets you delete the nth-from-last node in one pass, plus the dummy-head trick in Java.
Coding Interview
Jason Yang · 04 Aug, 2026
Longest Palindromic Substring (LeetCode 5): why expanding around each center beats the DP table, the two-center trick for even lengths, and clean Java.
Coding Interview
Jason Yang · 04 Aug, 2026
Advanced graphs in Java need named algorithms: Dijkstra for weighted shortest paths, Prim/Kruskal for a spanning tree, Bellman-Ford, and topological sort.