会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
summer_zhou
博客园
首页
新随笔
联系
管理
订阅
2013年10月2日
Single Number
摘要: Q: 求出数组中只出现1次的数,其他数都出现2次。 int singleNumber(int A[], int n) { // Note: The Solution object is instantiated only once and is reused by each test case. int num = 0; for(int i=0;i<n;i++) num^=A[i]; return num; }
阅读全文
posted @ 2013-10-02 22:51 summer_zhou
阅读(117)
评论(0)
推荐(0)
编辑
公告