Algorithms

Data structures and algorithms problems, each with a step-by-step explanation, a worked example and tested Java code. 497 problems in 21 topics.

New here? Start with the roadmap What algorithm problems test, how to read the limits, and the order to learn the 21 topics

Fundamentals

Arrays & Hashing 68 problems

Strings & Hashing 40 problems

Two Pointers 18 problems

Start here: Two Pointers Basics

Sliding Window 26 problems

Start here: Sliding Window Basics

Sorting 9 problems

Math 20 problems

Bit Manipulation 20 problems

Start here: Bit Manipulation Basics

Data Structures

Stack 23 problems

Start here: Monotonic Stack: Introduction

Linked List 25 problems

Heap / Priority Queue 16 problems

Start here: Heap / Priority Queue - Introduction

Trees 34 problems

Start here: Trees - Introduction

Trie 12 problems

Matrix 10 problems

Design 12 problems

Graphs

Graph 38 problems

Start here: Graph - Introduction

Union Find 7 problems

Techniques

Backtracking 19 problems

Start here: Backtracking Basics

Greedy 22 problems

Intervals 13 problems

Dynamic Programming 39 problems

Start here: Dynamic Programming Introduction