Workspace

Problem sheet

3 day streakD

Your problem sheet

Learn a pattern, walk through the example, then write it yourself.

116 problems
116 problems
SolvedProblemDifficultyTopicBookmark
Binary SearchEasyBinary Search
Lower Bound & Search Insert PositionEasyBinary Search
Upper BoundEasyBinary Search
First & Last OccurrenceMediumBinary Search
Search in a Rotated Sorted ArrayMediumBinary Search
Rotated Search with DuplicatesMediumBinary Search
Minimum in a Rotated Sorted ArrayMediumBinary Search
Find a Peak ElementMediumBinary Search
Single Element in a Sorted ArrayMediumBinary Search
Integer Square RootEasyBinary Search
Exact Integer Nth RootMediumBinary Search
Search a 2D MatrixMediumBinary Search
Kth Smallest in a Sorted MatrixMediumBinary Search
Koko Eating BananasMediumBinary Search
Capacity to Ship Packages Within D DaysMediumBinary Search
Split Array Largest SumHardBinary Search
Minimum Days to Make BouquetsMediumBinary Search
Aggressive Cows / Maximum Minimum DistanceMediumBinary Search
Median of Two Sorted ArraysHardBinary Search
Kth Element of Two Sorted ArraysHardBinary Search
Valid ParenthesesEasyStacks
Min StackMediumStacks
Queue Using Two StacksEasyStacks
Evaluate Reverse Polish NotationMediumStacks
Infix to PostfixMediumStacks
Decode a Repeated StringMediumStacks
Simplify Unix PathMediumStacks
Remove Adjacent DuplicatesEasyStacks
Next Greater ElementMediumStacks
Next Greater Element in a Circular ArrayMediumStacks
Next Smaller ElementMediumStacks
Daily TemperaturesMediumStacks
Stock SpanMediumStacks
Largest Rectangle in a HistogramHardStacks
Maximal Rectangle in a Binary MatrixHardStacks
Trapping Rain Water with a StackHardStacks
Sum of Subarray MinimumsMediumStacks
Asteroid CollisionMediumStacks
Remove K DigitsMediumStacks
Longest Valid ParenthesesHardStacks
Maximum Sum of a Size-K SubarrayEasySliding Window
Maximum Vowels in a SubstringMediumSliding Window
First Negative in Every WindowEasySliding Window
Find All Anagrams in a StringMediumSliding Window
Permutation in a StringMediumSliding Window
Longest Substring Without RepeatsMediumSliding Window
Longest Substring with At Most K DistinctMediumSliding Window
Longest Repeating Character ReplacementMediumSliding Window
Max Consecutive Ones IIIMediumSliding Window
Minimum Size Subarray SumMediumSliding Window
Minimum Window SubstringHardSliding Window
Subarrays with Exactly K DistinctHardSliding Window
Binary Subarrays with SumMediumSliding Window
Subarray Product Less Than KMediumSliding Window
Sliding Window MaximumHardSliding Window
Traversal & SearchEasyLinked Lists
Insert & Delete by PositionEasyLinked Lists
Reverse a Linked ListEasyLinked Lists
Middle of a Linked ListEasyLinked Lists
Detect a Linked List CycleEasyLinked Lists
Find the Cycle EntryMediumLinked Lists
Merge Two Sorted ListsEasyLinked Lists
Remove the Nth Node from the EndMediumLinked Lists
Intersection of Two Linked ListsEasyLinked Lists
Palindrome Linked ListEasyLinked Lists
Remove Duplicates from a Sorted ListEasyLinked Lists
Add Two NumbersMediumLinked Lists
Reorder a Linked ListMediumLinked Lists
Rotate a Linked ListMediumLinked Lists
Reverse Nodes in k-GroupHardLinked Lists
Copy a List with Random PointersMediumLinked Lists
Merge k Sorted ListsHardLinked Lists
Merge Sort on a Linked ListMediumLinked Lists
Preorder TraversalEasyTrees
Inorder TraversalEasyTrees
Postorder TraversalEasyTrees
Level Order TraversalEasyTrees
Zigzag Level OrderMediumTrees
Morris Inorder TraversalMediumTrees
Maximum Depth (Height)EasyTrees
Check a Balanced Binary TreeEasyTrees
Diameter of a Binary TreeEasyTrees
Maximum Path SumHardTrees
Symmetric TreeEasyTrees
Invert a Binary TreeEasyTrees
Count Complete Tree NodesMediumTrees
Root-to-Leaf PathsEasyTrees
Root-to-Leaf Path SumEasyTrees
Lowest Common AncestorMediumTrees
Nodes at Distance KMediumTrees
Right Side ViewMediumTrees
Boundary TraversalMediumTrees
Vertical Order TraversalHardTrees
Search in a BSTEasyTrees
Insert into a BSTMediumTrees
Delete from a BSTMediumTrees
Validate a BSTMediumTrees
Kth Smallest in a BSTMediumTrees
Build from Preorder & InorderMediumTrees
Serialize & DeserializeHardTrees
Flatten to a Linked ListMediumTrees
Depth-First Search (DFS)EasyGraphs
Breadth-First Search (BFS)EasyGraphs
Dijkstra’s AlgorithmMediumGraphs
Topological Sort (Kahn’s Algorithm)MediumGraphs
Bellman–Ford AlgorithmMediumGraphs
Floyd–Warshall AlgorithmMediumGraphs
Prim’s AlgorithmMediumGraphs
Kruskal’s AlgorithmMediumGraphs
Disjoint Set Union (Union-Find)MediumGraphs
Bipartite Graph CheckMediumGraphs
Directed Cycle DetectionMediumGraphs
Kosaraju’s AlgorithmHardGraphs
Tarjan’s SCC AlgorithmHardGraphs
Bridges in an Undirected GraphHardGraphs
Articulation PointsHardGraphs

Practice at your own pace. Your bookmarks and solved problems stay in this browser.

A good place to start

Explore a pattern

A little guidance

Start with a pattern, read through a problem, and mark it solved when the idea clicks. Save anything you want to revisit.

New tutorials are added one at a time. Your bookmarks and solved checkmarks stay in this browser.

Explore the roadmap