Single Number II

##题目

####Single Number II

Given an array of integers, every element appears three except for one. Find that single one.

####Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?

##解题思路
该题与[Single Number][1]相同,只是该题中是元素出现3次。这里同样采用上一题的方法,统计1的个数,只不过模3而已。

##算法代码
代码采用JAVA实现:

1
2


Comments