双指针部分:
https://leetcode-cn.com/problems/two-sum-ii-input-array-is-sorted/
https://leetcode-cn.com/problems/sum-of-square-numbers/
(注意双指针p取0开始,条件p<=q)
https://leetcode-cn.com/problems/reverse-vowels-of-a-string/
(注意改变字符串不会影响原值,要改成引用类型如数组)
https://leetcode-cn.com/problems/valid-palindrome-ii
(一定要注意循环终止条件)
https://leetcode-cn.com/problems/merge-sorted-array/
(条件!条件!)
https://leetcode-cn.com/problems/longest-word-in-dictionary-through-deleting/
(注意审题:字典顺序最小,可以先比较首字母小了再检查)
网友评论