Leetcode no. 136
来源:互联网 发布:vb datagrid增加列 编辑:程序博客网 时间:2024/06/08 16:37
136. Single Number
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
public class Solution { public int singleNumber(int[] nums) { int res=0; for (int ele: nums){ res ^= ele; } return res; }}
0 0
- Leetcode no. 136
- Leetcode NO.136 Single Number
- LeetCode--No.136--Single Number
- LeetCode No.11 ~No.12
- Leetcode NO.78 Subsets
- Leetcode NO.77 Combinations
- Leetcode NO.46 Permutations
- 【leetcode】No. 235 LCABST
- LeetCode no. 35
- Leetcode no. 37
- Leetcode no. 279
- Leetcode no. 335
- Leetcode no. 283
- Leetcode no. 181 (sql)
- Leetcode no. 40
- Leetcode no. 238
- Leetcode no. 26
- Leetcode no. 80
- centOS6.5下安装jdk1.7
- BigDecimal.dive(one,scale,BigDecimal.ROUND_HALF_UP)不能四舍五入!!
- 乱序字符串
- sicily Tiling a Grid With Dominoes
- Unity_二维纹理 Texture 2D_4_总结细节
- Leetcode no. 136
- BLE
- Tomcat war包应用发布简述
- Linux进程启动过程分析do_execve(可执行程序的加载和运行)---Linux进程的管理与调度(十一)
- liunx 下thinkphp伪静态配置 rewrite
- SwipeRefreshLayout官方推荐下拉刷新
- C# Process.Start()方法详解 .
- MySQL数据库为已有表主键设置自增且初始值为1000
- Java 基于Tcp/ip连接的多人交互聊天室(Socket编程)