Coding Interview
54. Spiral Matrix
Jason Yang · 04 Aug, 2026
Spiral Matrix (LeetCode 54): walk the grid clockwise by tracking four edges and peeling one row or column off after each pass — clean Java, no visited set.
Coding Interview
Jason Yang · 04 Aug, 2026
Spiral Matrix (LeetCode 54): walk the grid clockwise by tracking four edges and peeling one row or column off after each pass — clean Java, no visited set.
Coding Interview
Jason Yang · 04 Aug, 2026
Group Anagrams (LeetCode 49): pick a canonical key so every anagram hashes to the same bucket. Sorted-key vs count-array key in Java, with complexity.
Coding Interview
Jason Yang · 04 Aug, 2026
Rotate Image (LeetCode 48): why transpose-then-reverse rotates a matrix 90° clockwise in place, with the O(1)-space Java solution and the index math behind it.
Coding Interview
Jason Yang · 04 Aug, 2026
Combination Sum (LeetCode 39): why passing the same start index lets you reuse numbers, plus a sorted-and-pruned backtracking solution in Java.
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.