跳到主要内容

Array Two Pointers(数组双指针)

a. 对撞指针题目

题号标题题解难度
0167Two Sum II - Input Array Is Sorted(两数之和 II - 输入有序数组)Python中等
0344Reverse String(反转字符串)Python简单
0345Reverse Vowels of a String(反转字符串中的元音字母)Python简单
0125Valid Palindrome(验证回文串)Python简单
0011Container With Most Water(盛最多水的容器)Python中等
0611Valid Triangle Number(有效三角形的个数)Python中等
00153Sum(三数之和)Python中等
00163Sum Closest(最接近的三数之和)Python中等
00184Sum(四数之和)Python中等
02593Sum Smaller(较小的三数之和)Python中等
0658Find K Closest Elements(找到 K 个最接近的元素)Python中等
1099Two Sum Less Than K(小于 K 的两数之和)Python简单
0075Sort Colors(颜色分类)Python中等
0360Sort Transformed Array(有序转化数组)Python中等
0977Squares of a Sorted Array(有序数组的平方)Python简单
0881Boats to Save People(救生艇)Python中等
0042Trapping Rain Water(接雨水)Python困难
0443String Compression(压缩字符串)Python中等

b. 快慢指针题目

题号标题题解难度
0026Remove Duplicates from Sorted Array(删除有序数组中的重复项)Python简单
0080Remove Duplicates from Sorted Array II(删除有序数组中的重复项 II)Python中等
0027Remove Element(移除元素)Python简单
0283Move Zeroes(移动零)Python简单
0845Longest Mountain in Array(数组中的最长山脉)Python中等
0088Merge Sorted Array(合并两个有序数组)Python简单
0719Find K-th Smallest Pair Distance(找出第 K 小的数对距离)Python困难
0334Increasing Triplet Subsequence(递增的三元子序列)Python中等
0978Longest Turbulent Subarray(最长湍流子数组)Python中等
剑指 Offer 21调整数组顺序使奇数位于偶数前面Python简单

c. 分离双指针题目

题号标题题解难度
0350Intersection of Two Arrays II(两个数组的交集 II)Python简单
0925Long Pressed Name(长按键入)Python简单
0844Backspace String Compare(比较含退格的字符串)Python简单
1229Meeting Scheduler(安排会议日程)Python中等
0415Add Strings(字符串相加)Python简单
0392Is Subsequence(判断子序列)Python简单