题库chevron_right分类chevron_right数组
list

数组

1672 道题目
简单: 363中等: 876困难: 433

数组 是技术面试里最常出现的能力维度之一。建议先掌握基础题型的边界处理,再逐步过渡到模式识别和复杂度 trade-off。

面试场景

高频考察问题建模、边界条件与口头表达的清晰度。

常见误区

只背模板不解释为什么,容易在追问里失分。

练习策略

每轮练 3-5 题,固定复盘复杂度和可替代解法。

推荐练习顺序

题库

数组 题库

先展示一段最适合快速浏览的题目列表,继续滚动时再慢慢续载,避免专题页被长列表一下子拉穿。

慢加载专题题库

适合这类题很多的专题,先扫结构,再逐步深入。

hourglass_bottom滚动续载
search
tune难度

当前展示 24 / 1,672 道题目

每次续载 24 题
#题目难度
1

两数之和

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

简单
4

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

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

困难
11

盛最多水的容器

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

中等
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.

中等
18

四数之和

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

中等
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…

简单
31

下一个排列

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

中等
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.

困难
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…

中等
41

缺失的第一个正数

Identify the smallest missing positive integer in an unsorted array using constant space and linear time scanning techni…

困难
42

接雨水

Calculate the total trapped rain water using the elevation map array, leveraging dynamic programming and two-pointer pat…

困难
45

跳跃游戏 II

Jump Game II requires finding the minimum jumps to reach the end of an array using dynamic programming and greedy techni…

中等
46

全排列

Generate all possible orderings of a distinct integer array using backtracking search with careful pruning to avoid dupl…

中等
47

全排列 II

Generate all unique permutations of an array containing duplicates using backtracking and pruning to avoid repeated sequ…

中等
48

旋转图像

Rotate an n x n matrix 90 degrees clockwise in-place using array manipulation and mathematical indexing techniques effic…

中等
49

字母异位词分组

Group the anagrams in a list of strings using efficient hash table-based methods, focusing on array scanning.

中等

swap_vert在题库框内继续向下滚动,也会自动续载

关联高频模式

LeetCode 数组题型题解:1672题训练路线