Common Problem Patterns

Common Problem Patterns Overview

Competitive coding problems often follow certain patterns. Recognizing these patterns helps in quickly identifying the right approach.

Popular Patterns

  • Sliding Window
  • Two Pointers
  • Fast & Slow Pointers
  • Binary Search
  • Prefix Sum
  • Backtracking
  • BFS/DFS
  • Topological Sort
  • Union Find
  • Bitmasking
  • Greedy
  • Dynamic Programming

How to Use Patterns

When you see a new problem, try to map it to a known pattern. Practice problems by pattern to build intuition.

Open full interactive app