Single NumberII
题目:
Given 3*n + 1 numbers, every numbers occurs triple times except one, find it.
分析:
3个数抵消,不进位加法,变成三进制,每位单独加起来,得到的数就是结果
A[j] >> i & 1; 用来把一个整数拆成Bit位
解法:
Last updated
题目:
Given 3*n + 1 numbers, every numbers occurs triple times except one, find it.
分析:
3个数抵消,不进位加法,变成三进制,每位单独加起来,得到的数就是结果
A[j] >> i & 1; 用来把一个整数拆成Bit位
解法:
Last updated