题库chevron_right分类chevron_right双指针
compare_arrows

双指针

182 道题目
简单: 54中等: 104困难: 24

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

面试场景

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

常见误区

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

练习策略

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

推荐练习顺序

题库

双指针 题库

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

慢加载专题题库

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

hourglass_bottom滚动续载
search
tune难度

当前展示 24 / 182 道题目

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

最长回文子串

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

中等
11

盛最多水的容器

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

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

中等
19

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

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

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

简单
31

下一个排列

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

中等
42

接雨水

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

困难
61

旋转链表

Rotate a singly linked list to the right by k positions using careful pointer manipulation and two-pointer traversal tec…

中等
75

颜色分类

Sort Colors requires in-place reordering of an array using a two-pointer scanning strategy to group 0s, 1s, and 2s effic…

中等
80

删除有序数组中的重复项 II

Solve the problem of removing duplicates from a sorted array in-place, ensuring each element appears at most twice, usin…

中等
82

删除排序链表中的重复元素 II

Remove duplicates from a sorted linked list, leaving only distinct values, and return the modified list in sorted order.

中等
86

分隔链表

Partition a linked list such that all nodes less than x come before nodes greater than or equal to x while preserving re…

中等
88

合并两个有序数组

Merge two sorted arrays into the first array in non-decreasing order, using a two-pointer approach.

简单
125

验证回文串

Check if a given string is a valid palindrome by using two-pointer scanning and invariant tracking techniques.

简单
141

环形链表

Determine if a given linked list contains a cycle using pointer manipulation or hashing, focusing on detecting repeated …

简单
142

环形链表 II

Identify the start of a cycle in a linked list using pointer manipulation, efficiently handling edge cases without modif…

中等
143

重排链表

Reorder List requires careful pointer manipulation in a singly linked list to interleave nodes from the ends without alt…

中等
148

排序链表

Sort List requires sorting a singly linked list efficiently using pointer manipulation and merge sort for optimal perfor…

中等
151

反转字符串中的单词

Reverse Words in a String requires reordering words using precise two-pointer scanning with careful space handling for e…

中等
160

相交链表

Given two linked lists, find the node where they intersect or return null if they do not.

简单

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

关联高频模式

LeetCode 双指针题型题解:182题训练路线