2,808 curated problems

LeetCode Problem Bank

Complete coverage of LeetCode interview problems with multi-language solutions, complexity analysis, and interviewer probes. Organized by difficulty, topic, and solving pattern for focused practice.

translateBilingual readingaccount_tree70 topic hubstimeline136 solve patterns

Topic map

Browse by Category

Jump into dedicated topic hubs with representative problems, difficulty mix, and linked patterns.

View all topic hubs

Problem library

Problem Library

Search, filter by category and difficulty, and jump straight into detailed solution pages.

search
categoryCategory
30 popular
tuneDifficulty

2,808 problems

#TitleDifficulty
1

Two Sum

Two Sum is solved fastest by storing seen values in a hash map and checking each number's needed complement once.

Easy
2

Add Two Numbers

Add Two Numbers requires careful linked-list pointer manipulation to sum digits while handling carries efficiently in in…

Medium
3

Longest Substring Without Repeating Characters

Find the length of the longest substring without repeating characters using a sliding window and hash map to track state…

Medium
4

Median of Two Sorted Arrays

Find the median of two sorted arrays using binary search for efficient O(log(min(m, n))) time complexity.

Hard
5

Longest Palindromic Substring

Find the longest contiguous palindromic substring in a given string using dynamic programming and two-pointer expansion …

Medium
6

Zigzag Conversion

Convert a string into a zigzag pattern across multiple rows and read it line by line efficiently for string manipulation…

Medium
7

Reverse Integer

Reverse Integer challenges you to invert the digits of a signed 32-bit integer, handling overflow and negative values ca…

Medium
8

String to Integer (atoi)

Convert a string to a 32-bit signed integer by carefully parsing characters, handling signs, and ignoring invalid traili…

Medium
9

Palindrome Number

Determine if a given integer reads the same forward and backward using a math-driven solution strategy without convertin…

Easy
10

Regular Expression Matching

The Regular Expression Matching problem involves checking if a string matches a pattern using '.' and '*'.

Hard
11

Container With Most Water

Find two vertical lines that can form a container with the most water in a given array of heights.

Medium
12

Integer to Roman

Convert a given integer to its Roman numeral representation using hash table mapping and decimal place math operations e…

Medium
13

Roman to Integer

Convert a Roman numeral string into an integer using a hash table and mathematical principles to determine value order.

Easy
14

Longest Common Prefix

Find the longest common prefix in an array of strings, returning an empty string if none exists.

Easy
15

3Sum

Given an integer array, return all unique triplets where the sum is zero using two-pointer scanning with careful duplica…

Medium
16

3Sum Closest

Find the sum of three integers in an array that is closest to a given target using two-pointer scanning.

Medium
17

Letter Combinations of a Phone Number

Generate all letter combinations a digit string can represent using backtracking with pruning, leveraging hash table map…

Medium
18

4Sum

The 4Sum problem requires finding all unique quadruplets in an array that sum to a specific target value.

Medium
19

Remove Nth Node From End of List

Remove the nth node from the end of a linked list using a two-pointer approach to solve efficiently.

Medium
20

Valid Parentheses

Determine if a string of parentheses, brackets, and braces is correctly nested using a stack for proper order validation…

Easy
21

Merge Two Sorted Lists

Merge two sorted linked lists by splicing nodes into one sorted list using linked-list pointer manipulation and recursio…

Easy
22

Generate Parentheses

Generate Parentheses requires generating all valid combinations of parentheses with given pairs using backtracking and s…

Medium
23

Merge k Sorted Lists

Merge k Sorted Lists requires efficiently combining multiple sorted linked lists into one using pointers and priority qu…

Hard
24

Swap Nodes in Pairs

Learn how to swap every adjacent linked-list pair by rewiring nodes safely without changing values or breaking the remai…

Medium
25

Reverse Nodes in k-Group

Reverse Nodes in k-Group challenges you to reverse segments of a linked list in groups of size k.

Hard
26

Remove Duplicates from Sorted Array

Learn how to remove duplicates from a sorted array in-place using two-pointer scanning while preserving element order.

Easy
27

Remove Element

Remove Element challenges you to remove a value from an array in-place using efficient two-pointer scanning and tracking…

Easy
28

Find the Index of the First Occurrence in a String

Locate the first occurrence of a substring within a string using a two-pointer scanning strategy and invariant tracking …

Easy
29

Divide Two Integers

Solve Divide Two Integers by turning repeated subtraction into bit-shifted chunk subtraction with careful sign and overf…

Medium
30

Substring with Concatenation of All Words

Find all starting indices of substrings in a string that are concatenations of a given list of words.

Hard
31

Next Permutation

Next Permutation is a medium-difficulty problem focusing on generating the next lexicographically greater permutation of…

Medium
32

Longest Valid Parentheses

Compute the length of the longest well-formed parentheses substring using state transition dynamic programming and stack…

Hard
33

Search in Rotated Sorted Array

Find the index of a target in a rotated sorted array using a careful binary search that handles pivot shifts.

Medium
34

Find First and Last Position of Element in Sorted Array

Locate the first and last index of a target in a sorted array using binary search for precise O(log n) performance.

Medium
35

Search Insert Position

Find the correct index for a target value in a sorted array using binary search, or return the position where it should …

Easy
36

Valid Sudoku

Check if a 9x9 Sudoku board is valid by scanning rows, columns, and sub-boxes with hash lookups, ensuring no duplicates …

Medium
37

Sudoku Solver

Solve the Sudoku puzzle by filling empty cells while respecting Sudoku's rules using array scanning and backtracking.

Hard
38

Count and Say

Count and Say requires building the nth sequence term by iteratively applying a run-length encoding on strings of digits…

Medium
39

Combination Sum

Find all unique combinations of numbers from a distinct array that sum to a target using controlled backtracking search.

Medium
40

Combination Sum II

Find all unique combinations of numbers that sum to a target using backtracking with careful pruning to avoid duplicates…

Medium

southScroll down for more

FAQ

A few common questions about the bank

Use these questions to pick the right entry point before jumping into individual problems.

What does each LeetCode page include?add

Each problem page includes a summary, solve flow, multi-language code, complexity analysis, pitfalls, interviewer follow-ups, and related problems.

Should I start by topic, pattern, or difficulty?add

Use difficulty tracks for fundamentals, topic hubs for targeted weak spots, and pattern pages when you want reusable solving frames that transfer across questions.

Are the pages bilingual?add

Yes. The public LeetCode corpus supports both English and Chinese routes so you can pair technical understanding with bilingual interview preparation.

How does the problem bank connect to the AI copilot?add

The bank helps you build pattern memory and explanation quality. When you move into a live interview or OA workflow, the LeetCode Interview Copilot and desktop client become the next step.

LeetCode Problem Bank - 2808 Solutions | interviewaibox.co