LeetCode之Remove Duplicates from Sorted Array
2014-04-14 23:03
232 查看
int removeDuplicates(int A[], int n) //Remove Duplicates from Sorted Array { if (n == 0) return 0; int index = 0; for (int i = 1; i < n; i++) { if (A[index] != A[i]) A[++index] = A[i]; } return index + 1; }
相关文章推荐
- Remove Duplicates from Sorted Array II--LeetCode
- [LeetCode] Remove Duplicates From Sorted Array II
- leetcode 题解:Remove Duplicates from Sorted Array(已排序数组去重)
- LeetCode 26 Remove Duplicates from Sorted Array
- leetcode 36: Remove Duplicates from Sorted Array II
- leetcode_Remove Duplicates from Sorted Array II
- LeetCode(80) Remove Duplicates from Sorted Array II
- leetcode--26. Remove Duplicates from Sorted Array
- Remove Duplicates from Sorted Array - LeetCode
- LeetCode @ Remove Duplicates from Sorted Array 数组去重
- LeetCode 第二十六题(Remove Duplicates from Sorted Array) java
- Leetcode | Remove Duplicates from Sorted Array I && II
- leetcode_26. Remove Duplicates from Sorted Array
- [leetcode] python 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(26) Remove Duplicates from Sorted Array
- LeetCode - Remove Duplicates from Sorted Array II