Engineering & Guides

Coding Patterns

23 articles on coding patterns.

Illustration of a dense all-pairs brute force computation on the left transforming into a single optimized path on the right
Coding Patterns

Brute 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.

6 min read Aug 31, 2026Read
A developer coding at a laptop beside a large stopwatch, representing timed coding interview practice.
Coding Patterns

Coding 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.

9 min read Aug 26, 2026Read
Engineer explaining their thought process to an interviewer during a coding interview
Coding Patterns

How 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.

9 min read Aug 21, 2026Read
Graph traversal algorithms cover: BFS, DFS, and how to choose
Coding Patterns

Graph 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.

8 min read Aug 6, 2026Read
BFS shortest path algorithm with binary search: a monotonic feasibility strip flipping from no to yes marks the answer threshold
Coding Patterns

BFS + 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.

7 min read Aug 5, 2026Read
Grid of cells morphing into a node and edge graph
Coding Patterns

Graph 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.

11 min read Jul 20, 2026Read
Advanced BFS graph traversal: multi-source waves and two search frontiers meeting in the middle
Coding Patterns

Advanced 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.

11 min read Jul 19, 2026Read
Two Pointers pattern illustration showing two arrow cursors on a sorted array
Coding Patterns

Two 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.

11 min read Jul 19, 2026Read
Editorial illustration of an engineer narrating an algorithm at a whiteboard while speech bubbles and evaluation cards drift toward a calm interviewer taking notes, in a deep navy and teal palette, representing an Amazon coding interview where communication matters as much as the code.
Coding Patterns

Amazon 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.

11 min read Jul 18, 2026Read