public class Solution { /** * @param A: An integer array * @return: An integer */ public int singleNumber(int[] A) { int x = A[0]; for (int i = 1; i < A.length; i++) { x ^= A[i]; } return x; } }
LintCode 82---落单的数
猜你喜欢
转载自www.cnblogs.com/cnmoti/p/10828440.html
今日推荐
周排行