Single Number III
题目:
Given 2*n + 2 numbers, every numbers occurs twice except two, find them.
分析:
把2n+2变成2n+1问题,把原来集合分为2个集合。(c-1)&c 去掉最后一个1的作用,c-(c-1)&c得到最后1
解法:
Last updated
题目:
Given 2*n + 2 numbers, every numbers occurs twice except two, find them.
分析:
把2n+2变成2n+1问题,把原来集合分为2个集合。(c-1)&c 去掉最后一个1的作用,c-(c-1)&c得到最后1
解法:
Last updated