Skip to content

Latest commit

 

History

History

136.Single_Number

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

136. Single Number (Medium)

链接

题目:https://leetcode.com/problems/single-number/
代码(github):https://github.com/illuz/leetcode

题意

一个整数数组中只有一个数出现了一次,其它都出现了两次,要你找出这个数。

分析

很经典的面试题,二进制异或的经典应用。
了解了异或的性质后就知道为什么所有数异或一遍这个数就能出来。