Engineering & Guides

Coding Patterns

12 articles on coding patterns.

Dynamic Programming State and Transition Framework - Abstract visualization of connected nodes forming a DP table
Coding Patterns

Dynamic Programming Basics: State + Transition, Not Memorization

Stop memorizing DP solutions. Learn the two-step framework (state + transition) that makes any dynamic programming problem approachable, with a full Coin Change walkthrough.

11 min read Jul 5, 2026Read
Illustration of an array being partitioned into red, white, and blue bands by low, mid, and high pointers
Coding Patterns

Dutch National Flag Problem: Three-Pointer Partition and the Sort Colors Pattern

The Dutch National Flag problem (LeetCode Sort Colors 75) sorts 0s, 1s, and 2s in a single in-place pass with three pointers. Here is the intuition, the code, a trace, and the mistakes to avoid.

5 min read Jul 3, 2026Read
Linked list with a cycle and fast and slow pointers
Coding Patterns

Detect a Cycle in a Linked List: Fast and Slow Pointers

A clear guide to detecting a cycle in a linked list using Floyd's fast and slow pointer technique, with Python code and the math behind why it works.

6 min read Jul 1, 2026Read
Sliding window algorithm visualization showing a glowing blue window frame moving across colorful data blocks
Coding Patterns

The Sliding Window Algorithm: The Pattern That Turns O(n²) into O(n) Overnight

I avoided the sliding window pattern for months, writing nested loops that timed out on every large test case. Here's the decision framework that finally made it click, with code templates and five practice problems in order.

12 min read Jun 28, 2026Read
Editorial illustration of dynamic programming as a small family of recurring shapes: a single row of connected cells, a two dimensional grid being filled, a triangular range being split, a small knapsack with item tokens, and a set of glowing bits, floating above a developer's desk to represent the core dynamic programming patterns.
Coding Patterns

Dynamic Programming Patterns: The Core Archetypes

Most DP problems fall into a few dynamic programming patterns. Here are the five core archetypes, how to recognize each from its state, and a learning approach that sticks.

10 min read Jun 25, 2026Read
Editorial illustration of two software engineers sitting side by side at one glowing screen, mid-conversation, collaborating on a coding problem together. Soft speech-bubble shapes and thought lines flow between them and the code, suggesting narration and clarifying questions, with warm gold light around the shared dialogue. It represents the Microsoft coding interview as a problem-solving conversation rather than a silent test.
Coding Patterns

Microsoft Coding Interviews in 2026: The Problem-Solving Conversation

Microsoft coding interviews score the conversation, not just the code. The 2026 loop, why narration beats a silent solve, and how to prep for the problem-solving conversation.

9 min read Jun 24, 2026Read
Editorial illustration of a glowing recursive call tree made of circuit-like nodes, with small memo cards pinned to repeated branches as if the tree is remembering answers it already computed. Pinned branches glow warm gold and the repetition collapses where memos are pinned, representing memoization caching and reusing results.
Coding Patterns

Memoization: Turning Recursion Into Dynamic Programming

Memoization is recursion plus a cache, and it is top-down dynamic programming. How to add it in three steps, how it compares to tabulation, and when to use each.

9 min read Jun 23, 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.

8 min read May 24, 2026Read
Dynamic programming on trees illustration showing binary tree with glowing nodes and bottom-up computation arrows
Coding Patterns

DP on Trees: When Recursion Meets Dynamic Programming

Dynamic programming on trees combines recursion with memoization to solve problems like maximum path sum and house robber on tree structures. Learn the template, patterns, and rerooting technique.

12 min read May 23, 2026Read