leetcode Remove Duplicates from Sorted Array
来源:互联网 发布:mac电脑如何卸载sdk 编辑:程序博客网 时间:2024/05/18 02:44
class Solution {public: int removeDuplicates(int A[], int n) { if (n<2) return n; int delta=0; int i=1; while(i<n){ if (A[i]==A[i-1]) delta++; A[i-delta]=A[i]; i++; } return i-delta; }
0 0
- [leetcode][array] Remove Duplicates from Sorted Array
- 【Leetcode】【Array】Remove Duplicates from Sorted Array
- LeetCode: Remove Duplicates from Sorted Array
- LeetCode: Remove Duplicates from Sorted Array II
- [Leetcode] Remove Duplicates from Sorted Array
- [Leetcode] Remove Duplicates from Sorted Array II
- LeetCode: Remove Duplicates from Sorted Array
- LeetCode: Remove Duplicates from Sorted Array II
- [Leetcode] Remove Duplicates from Sorted Array II
- leetcode 35: Remove Duplicates from Sorted Array
- [LeetCode] Remove Duplicates from Sorted Array II
- [LeetCode] Remove Duplicates from Sorted Array
- Leetcode: Remove Duplicates from Sorted Array
- [leetcode] Remove Duplicates from Sorted Array II
- [LeetCode]Remove Duplicates from Sorted Array
- [LeetCode]Remove Duplicates from Sorted Array II
- [leetcode]Remove Duplicates from Sorted Array
- [leetcode]Remove Duplicates from Sorted Array II
- 4月英语——just say it
- 汉化InnoSetup5.5
- play的字段验证
- 新浪微博开发之二十九(原创微博view)
- hdu 2036 ||nyoj1011 叉乘求多面形面积(无论是凸凹边形都可以)
- leetcode Remove Duplicates from Sorted Array
- 使用Apache POI读取Excel文件
- Play的验证码
- java cp 和 hadoop cp
- C#String & StringBuilder
- 关于这次出差--解决自动制浆的一点收获---模拟信号的不稳定---变频器对整个电路的影响
- Swift调用OC之文件操作-NSBundle
- MATLAB中subplot的用法
- HDU 4614 Vases and Flowers [二分 + 线段树]