Browse by Pattern
Master coding patterns with 28 different algorithmic approaches
All Categories
>
Patterns
Array
6 problems
Fundamental data structure problems involving indexing, iteration, and manipulation.
Two Sum
Easy
Contains Duplicate
Easy
and 4 more...
Time: O(n)
Space: O(n), O(1)
View Problems →
Two Pointers
5 problems
Use two pointers moving towards each other or in the same direction to solve in O(n) time.
Find First and Last Position
Medium
Valid Palindrome
Easy
and 3 more...
Time: O(log n), O(n)
Space: O(1)
View Problems →
Dynamic Programming
4 problems
Break problems into subproblems and memoize results to avoid redundant computation.
Climbing Stairs
Easy
House Robber
Medium
and 2 more...
Time: O(n), O(amount × coins), O(n²)
Space: O(1), O(amount), O(n)
View Problems →
Hash Map
4 problems
Use hash tables for O(1) lookups and frequency counting. Great for key-value relationships.
Two Sum
Easy
Group Anagrams
Medium
and 2 more...
Time: O(n), O(n * k log k), O(n log n)
Space: O(n), O(n * k), O(k)
View Problems →
DFS
3 problems
Depth-first search for exploring all paths in trees and graphs recursively.
Maximum Depth of Binary Tree
Easy
Same Tree
Easy
and 1 more...
Time: O(n), O(V + E)
Space: O(h), O(V)
View Problems →
Sorting
3 problems
Arrange elements in order using various sorting algorithms and techniques.
Group Anagrams
Medium
Top K Frequent Elements
Medium
and 1 more...
Time: O(n * k log k), O(n log n)
Space: O(n * k), O(n)
View Problems →
Tree
3 problems
Hierarchical data structure problems involving traversal, construction, and manipulation.
Maximum Depth of Binary Tree
Easy
Same Tree
Easy
and 1 more...
Time: O(n)
Space: O(h), O(n)
View Problems →
BFS
2 problems
Breadth-first search for shortest path and level-order traversal problems.
Binary Tree Level Order Traversal
Medium
Shortest Path in Unweighted Graph
Medium
Time: O(n), O(V + E)
Space: O(n), O(V)
View Problems →
Binary Search
2 problems
Divide and conquer on sorted data to achieve O(log n) search complexity.
Binary Search
Easy
Find First and Last Position
Medium
Time: O(log n)
Space: O(1)
View Problems →
Graph
2 problems
Problems involving vertices, edges, and relationships between entities.
Number of Connected Components
Medium
Shortest Path in Unweighted Graph
Medium
Time: O(V + E)
Space: O(V)
View Problems →
Greedy
2 problems
Make locally optimal choices hoping to find a global optimum.
Best Time to Buy and Sell Stock
Easy
Payroll Distribution
Hard
Time: O(n), O(n log n)
Space: O(1), O(n)
View Problems →
Recursion
2 problems
Solve problems by breaking them down into smaller instances of the same problem.
Maximum Depth of Binary Tree
Easy
Same Tree
Easy
Time: O(n)
Space: O(h)
View Problems →
Stack
2 problems
LIFO data structure for parsing, expression evaluation, and nested structure problems.
Valid Parentheses
Easy
Daily Temperatures
Medium
Time: O(n)
Space: O(n)
View Problems →
String
2 problems
Text processing, pattern matching, and character manipulation problems.
Group Anagrams
Medium
Valid Palindrome
Easy
Time: O(n * k log k), O(n)
Space: O(n * k), O(1)
View Problems →
Divide and Conquer
1 problem
A useful algorithmic pattern for solving coding problems efficiently.
Merge Sort
Medium
Time: O(n log n)
Space: O(n)
View Problems →
Fibonacci
1 problem
A useful algorithmic pattern for solving coding problems efficiently.
Climbing Stairs
Easy
Time: O(n)
Space: O(1)
View Problems →
Hash Set
1 problem
A useful algorithmic pattern for solving coding problems efficiently.
Contains Duplicate
Easy
Time: O(n)
Space: O(n)
View Problems →
Heap
1 problem
A useful algorithmic pattern for solving coding problems efficiently.
Top K Frequent Elements
Medium
Time: O(n log n)
Space: O(n)
View Problems →
Knapsack
1 problem
A useful algorithmic pattern for solving coding problems efficiently.
Coin Change
Medium
Time: O(amount × coins)
Space: O(amount)
View Problems →
LIS
1 problem
A useful algorithmic pattern for solving coding problems efficiently.
Longest Increasing Subsequence
Hard
Time: O(n²)
Space: O(n)
View Problems →
Math
1 problem
A useful algorithmic pattern for solving coding problems efficiently.
Payroll Distribution
Hard
Time: O(n log n)
Space: O(n)
View Problems →
Monotonic Stack
1 problem
A useful algorithmic pattern for solving coding problems efficiently.
Daily Temperatures
Medium
Time: O(n)
Space: O(n)
View Problems →
Prefix Sum
1 problem
A useful algorithmic pattern for solving coding problems efficiently.
Product of Array Except Self
Medium
Time: O(n)
Space: O(1)
View Problems →
Proportional Allocation
1 problem
A useful algorithmic pattern for solving coding problems efficiently.
Payroll Distribution
Hard
Time: O(n log n)
Space: O(n)
View Problems →
Queue
1 problem
A useful algorithmic pattern for solving coding problems efficiently.
Binary Tree Level Order Traversal
Medium
Time: O(n)
Space: O(n)
View Problems →
Shortest Path
1 problem
A useful algorithmic pattern for solving coding problems efficiently.
Shortest Path in Unweighted Graph
Medium
Time: O(V + E)
Space: O(V)
View Problems →
Sliding Window
1 problem
Maintain a window of elements and slide it to find optimal subarrays efficiently.
Longest Substring Without Repeating Characters
Medium
Time: O(n)
Space: O(k)
View Problems →
Union Find
1 problem
A useful algorithmic pattern for solving coding problems efficiently.
Number of Connected Components
Medium
Time: O(V + E)
Space: O(V)
View Problems →
Pattern Statistics
28
Total Patterns
6
Most Used Pattern
2.2
Avg Patterns/Problem
7
Core Patterns (3+)
Most Popular Patterns
Array
6
Two Pointers
5
Dynamic Programming
4
Hash Map
4
DFS
3
Sorting
3
Tree
3
BFS
2
Binary Search
2
Graph
2
← Back to All Categories