码迷,mamicode.com
首页 > 其他好文 > 详细

[leetcode]题型整理之用bit统计个数

时间:2016-12-30 16:36:15      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:exit   without   code   etc   note   leetcode   div   near   not   

137. Single Number II

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

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

 

记录32个bit每个bit出现的次数不能被3整除的几位加起来。

[leetcode]题型整理之用bit统计个数

标签:exit   without   code   etc   note   leetcode   div   near   not   

原文地址:http://www.cnblogs.com/Gryffin/p/6237074.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!