@@ -0,0 +1,627 @@
+/**%0A *%0A *%09Given an array of integers, every element appears twice except for one.%0A *%09Find that single one.%0A *%0A *%09Note:%0A *%09Your algorithm should have a linear runtime complexity. %0A *%09Could you implement it without using extra memory?%0A *%0A *%09author : matao%0A */%0A%0A public class SingleNumber %7B%0A %09/**%0A%09 *%09a %5E a = 0,  a %5E 0 = a;%0A%09 */%0A %09public static int singleNumber(int%5B%5D nums) %7B%0A%09%09int temp = 0;%09%09%09%0A%09%09for(int i = 0; i %3C nums.length; i++) %7B%0A%09%09%09temp %5E= nums%5Bi%5D;%0A%09%09%7D%0A%09%09return temp;%0A%09%7D%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09int%5B%5D nums = %7B1, 2, 3, 3, 4, 1, 2%7D;%0A%09%09int result = singleNumber(nums);%0A%09%09System.out.println(result);%0A%09%7D%0A %7D%0A

add single number solution