码迷,mamicode.com
首页 >  
搜索关键字:removeelement    ( 63个结果
Remove Element
问题:删除数组中和elem相等的元素,并且返回新数组大小。英语不好。。。读错题了。。class Solution {public: int removeElement(int A[], int n, int elem) { int i,j; for(int i=0;...
分类:其他好文   时间:2014-08-01 23:03:22    阅读次数:223
LeetCode Remove Element
class Solution {public: int removeElement(int A[], int n, int elem) { if (A == NULL || n < 1) return 0; int rpos = 0, wpos = 0; ...
分类:其他好文   时间:2014-06-25 17:47:57    阅读次数:234
LeetCode --- Remove Element
题目链接题意:给出长度为n的数组,和整数elem, 要求删除数组中存在的elem,返回最终的数组长度。附上代码: 1 class Solution { 2 public: 3 int removeElement(int A[], int n, int elem) { 4 //...
分类:其他好文   时间:2014-06-09 13:38:05    阅读次数:190
63条   上一页 1 ... 5 6 7
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!