您的位置:首页 > 其它

leetcode总结4 -- 关于two pointers两个容易考的题目

2016-01-12 21:31 465 查看

Remove Element

/article/8637430.html

用数组尾部的index来接收the given element. 这里不用保持relative order

Move Zeros

/article/8637428.html

可以看成上面题目的翻版,从数组头部开始接收非0的元素。因为这里要保持relative order

Remove Duplicates from Sorted Array

技巧同上面类似

/article/8637480.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: