Coding Patterns
23 articles on coding patterns.
Coding PatternsBrute Force Algorithm: Write It First, Then Optimize
Writing the dumbest possible solution first is one of the most reliable coding-interview skills. Here is how a brute force algorithm becomes your baseline, and how to optimize it into the clever answer.
Coding PatternsCoding Interview Practice: From Timeouts to 25-Minute Hards
Eighteen months ago I could not finish a medium in 45 minutes. Here is the coding interview practice system that took me from timing out to solving hards in 25 minutes.
Coding PatternsHow to Pass a Coding Interview by Talking It Through
How to pass a coding interview by communicating your thought process. A five-phase framework to clarify, think out loud, narrate your code, test aloud, and turn the round into a conversation.
Coding PatternsGraph Traversal Algorithms: BFS, DFS, and How to Choose
Compare the core graph traversal algorithms: how BFS and DFS work, what they cost, the variants that matter, and a simple framework for choosing the right one under pressure.
Coding PatternsBFS + Binary Search: the Shortest Path When a Threshold, not Distance, Matters
Plain BFS finds the fewest steps, but some path problems minimize the largest jump instead. Here is how BFS plus binary search on the answer solves them, with a Python template.
Coding PatternsGraph Traversal on a Grid: Matrix Problems in Disguise
Islands, rotting oranges, maze escapes: every grid question is graph traversal with the edges left implicit. Here is the translation, in both directions.
Coding PatternsAdvanced BFS: Multi-Source, Stateful, and Bidirectional
Plain BFS is only the warm-up. Here are the three variations interviews actually test: multi source BFS, stateful BFS, and bidirectional BFS, with Python and a decision guide.
Coding PatternsTwo Pointers: The Pattern Inside Sorted Array Problems
The two pointer technique turns O(n²) array problems into O(n) solutions. Learn the three variations, when to use them over hash maps, and how to spot two pointer problems in interviews.
Coding PatternsAmazon Coding Interview Prep 2026: Leadership Principles in Your Algorithm Explanation
At Amazon, your algorithm gets you in the room, but how you narrate it decides the offer. A practical guide to weaving the Leadership Principles into how you explain your code.
