@@ -0,0 +1,1167 @@
+class Solution %7B%0A    public int%5B%5D singleNumber(int%5B%5D nums) %7B%0A        int xor = 0;%0A        for (int i=0; i%3Cnums.length; i++) %7B%0A            xor %5E= nums%5Bi%5D;%0A        %7D%0A        int mask = 1;%0A        while ((xor&mask) == 0) mask %3C%3C= 1;%0A        int%5B%5D left = new int%5Bnums.length%5D;%0A        int%5B%5D right = new int%5Bnums.length%5D;%0A        int leftRealLen, rightRealLen;%0A        leftRealLen = rightRealLen = 0;%0A        for (int i=0; i%3Cnums.length; i++) %7B%0A            if ((nums%5Bi%5D&mask) == 0) %7B%0A                left%5BleftRealLen%5D = nums%5Bi%5D;%0A                leftRealLen++;%0A            %7D else %7B%0A                right%5BrightRealLen%5D = nums%5Bi%5D;%0A                rightRealLen++;%0A            %7D%0A        %7D%0A        int%5B%5D result = new int%5B2%5D;%0A        for (int i=0; i%3CleftRealLen; i++) %7B%0A            result%5B0%5D %5E= left%5Bi%5D;%0A        %7D%0A        for (int i=0; i%3CrightRealLen; i++) %7B%0A            result%5B1%5D %5E= right%5Bi%5D;%0A        %7D%0A        return result;%0A    %7D%0A%7D%0A%0Apublic class single_number_iii %7B%0A    public static void main(String%5B%5D args) %7B%0A        Solution s = new Solution();%0A        int%5B%5D a = %7B1,1,2,2,3,4%7D;%0A        int%5B%5D b = s.singleNumber(a);%0A        System.out.format(%22%25d %25d%5Cn%22, b%5B0%5D, b%5B1%5D);%0A    %7D%0A%7D%0A

add https://leetcode.com/problems/single-number-iii/