赞
踩
双指针一般是快慢指针向后移动,或者左右指针向中间移动。双指针:双指针法的判定条件都是while(left<right)
下面是力扣1-150中双指针的题:
博客链接:
9.回文数:https://blog.csdn.net/L_smartworld/article/details/106544060
11.盛最多水的容器:https://blog.csdn.net/L_smartworld/article/details/106549754
15.三数之和:https://blog.csdn.net/L_smartworld/article/details/106584811
16.最接近的三数之和:https://blog.csdn.net/L_smartworld/article/details/106587060
18.四数之和:https://blog.csdn.net/L_smartworld/article/details/106602247
26.删除排序数组中的重复项:https://blog.csdn.net/L_smartworld/article/details/106639684
27.移除元素:https://blog.csdn.net/L_smartworld/article/details/106640533
31.下一个排列:https://blog.csdn.net/L_smartworld/article/details/106718448
42.接雨水:https://blog.csdn.net/L_smartworld/article/details/106856881
88.合并两个有序数组:https://blog.csdn.net/L_smartworld/article/details/107319959
125.验证回文串:https://blog.csdn.net/L_smartworld/article/details/107541942
剑指offer:
5.替换空格:https://blog.csdn.net/L_smartworld/article/details/104236697
21.调整数组顺序使奇数位于偶数前面:https://blog.csdn.net/L_smartworld/article/details/104512850
57.和为S的两个数字:https://blog.csdn.net/L_smartworld/article/details/105149781
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。