Engineering problems are under-defined; there are many solutions, good, bad, and indifferent. The art is to arrive at a good solution.

Sir Ove Arup

All Patterns

17 patterns

Arrays & Strings

Easy-Medium

Fundamental data structure patterns for manipulating sequential data. Master these basics as they fo...

0/30 solved0%

Backtracking

Medium

Build solutions incrementally, abandoning paths that cannot lead to valid solutions....

0/18 solved0%

Binary Search

Medium

Divide search space in half each iteration. Works on sorted arrays or when searching for optimal val...

0/12 solved0%

Dynamic Programming

Medium-Hard

DP = Recursion + Memoization (or Tabulation). Start by solving recursively, then optimize. The key i...

0/25 solved0%

Greedy

Medium

Make the locally optimal choice at each step, hoping to find the global optimum. Unlike DP, greedy a...

0/3 solved0%

Graphs

Medium-Hard

Network of nodes and edges. Key algorithms: DFS, BFS, topological sort, Union-Find, Dijkstra....

0/33 solved0%

Hash Map / Set

Easy

Use hash tables for O(1) average lookups, frequency counting, and duplicate detection. Foundation fo...

0/6 solved0%

Heap / Priority Queue

Medium

Efficiently track min/max elements. Essential for top K, streaming median, and scheduling....

0/13 solved0%

Intervals

Medium

Problems involving ranges with start/end points. Key: sort by start or end time....

0/7 solved0%

Linked List

Easy-Medium

Sequential data structure with node-based traversal. Key techniques: reversal, fast/slow pointers, d...

0/16 solved0%

Prefix Sum

Easy-Medium

Precompute cumulative sums to answer range sum queries in O(1). Combined with HashMap for finding su...

0/5 solved0%

Sliding Window

Medium

Maintain a window of elements that slides through the array. Track window state efficiently by addin...

0/12 solved0%

Stack / Monotonic Stack

Medium

LIFO structure for matching pairs, expression evaluation, and finding next greater/smaller elements ...

0/20 solved0%

Trees

Medium

Hierarchical data structure. Master DFS (preorder, inorder, postorder) and BFS (level order) travers...

0/25 solved0%

Trie

Medium

Tree structure for efficient string prefix operations. Each node represents a character....

0/6 solved0%

Two Pointers

Easy-Medium

Use two pointers to traverse data from different positions, often from both ends moving toward cente...

0/16 solved0%

Union-Find

Medium

Track disjoint sets efficiently. Supports union (merge) and find (membership)....

0/6 solved0%