2,808 道精选题目

LeetCode 题库

完整覆盖 LeetCode 高频面试题,每题附带多语言题解、复杂度分析和面试官追问。按难度、题型和模式组织,适合补短板,也适合构建系统化刷题路径。

translate中英文双语阅读account_tree70 个题型专题timeline136 种解题模式

Topic map

按题型进入专题页

直接进入题型 hub,看代表题、难度结构和相关模式。

查看全部题型专题

Problem library

全部题目

搜索、按题型和难度筛选,并直接进入题目详情页。

search
category题型分类
30 个常用分类
tune难度

2,808 道题目

#题目难度
1

两数之和

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

简单
2

两数相加

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

中等
3

无重复字符的最长子串

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

中等
4

寻找两个正序数组的中位数

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

困难
5

最长回文子串

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

中等
6

Z 字形变换

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

中等
7

整数反转

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

中等
8

字符串转换整数 (atoi)

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

中等
9

回文数

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

简单
10

正则表达式匹配

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

困难
11

盛最多水的容器

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

中等
12

整数转罗马数字

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

中等
13

罗马数字转整数

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

简单
14

最长公共前缀

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

简单
15

三数之和

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

中等
16

最接近的三数之和

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

中等
17

电话号码的字母组合

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

中等
18

四数之和

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

中等
19

删除链表的倒数第 N 个结点

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

中等
20

有效的括号

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

简单
21

合并两个有序链表

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

简单
22

括号生成

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

中等
23

合并 K 个升序链表

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

困难
24

两两交换链表中的节点

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

中等
25

K 个一组翻转链表

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

困难
26

删除有序数组中的重复项

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

简单
27

移除元素

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

简单
28

找出字符串中第一个匹配项的下标

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

简单
29

两数相除

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

中等
30

串联所有单词的子串

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

困难
31

下一个排列

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

中等
32

最长有效括号

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

困难
33

搜索旋转排序数组

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

中等
34

在排序数组中查找元素的第一个和最后一个位置

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

中等
35

搜索插入位置

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

简单
36

有效的数独

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

中等
37

解数独

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

困难
38

外观数列

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

中等
39

组合总和

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

中等
40

组合总和 II

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

中等

south向下滚动加载更多

FAQ

关于题库的几个常见问题

先用这几项判断该从哪类入口开始,再进入具体题目页。

这个 LeetCode 题库里每道题包含什么?add

每道题都包含题目摘要、解题思路、多语言代码、复杂度分析、常见坑点、面试官追问和关联题,适合刷题也适合面试复盘。

应该先按题型、模式还是难度开始?add

如果你想补基础,就从难度页开始;如果你知道短板在哪,就从题型页切入;如果你想建立可迁移的解题框架,就优先走模式页。

题库支持中英文吗?add

支持。LeetCode hub、专题页和题目详情都提供英文与中文路径,方便你同时准备英文面试表达和中文理解。

这和 AI 面试辅助产品怎么配合?add

题库负责训练题感、模式和表达;进入真实面试或在线笔试场景时,可以再接上 LeetCode Interview Copilot 和桌面端下载页形成闭环。

LeetCode 题库 - 2808道精选题解 | interviewaibox.co