Remove the duplicates from sorted array 026
2015-12-07 09:45
218 查看
my solution:
1. remove the duplicates of sorted array
2. return the new length of the array
i=1;j=2;
if(A[i]=A[j])
是:
i++,j++
否:
j++;
return i;
1. remove the duplicates of sorted array
2. return the new length of the array
i=1;j=2;
if(A[i]=A[j])
是:
i++,j++
否:
j++;
return i;
相关文章推荐
- jquery思维导图
- 《代码阅读方法与实践》阅读笔记一
- 凭证冲销FB08
- 将session存放至ocs进行存取
- MySQL数据库事务隔离级别(Transaction Isolation Level)
- Dubbo是什么
- [转]JS调用Android里面的方法,Android调用JS里面的方法
- Cannot load from mysql.proc. The table is probably corrupted解决办法
- 傅里叶变换的理解----计算幅值和相位
- 按需加载
- 计算两直线交点
- PHP+ajax分页实例简析
- 给飞机叶片穿戴上3D打印传感器
- centOS常用指令及快捷键
- 一种选择界面
- 广告滚动框
- 使用siege对web接口进行post方式的压力测试
- [LeetCode315] Count of Smaller Numbers After Self
- Android 自定义组件 方法篇
- jquery实现数字抽奖(版本2)