@@ -0,0 +1,664 @@
+/**%0A * https://oj.leetcode.com/problems/single-number-ii/%0A * Given an array of integers, every element appears three times except for one. Find that single one.%0A * Note:%0A * Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?%0A */%0Apublic class SingleNumberII %7B%0A    public int singleNumber(int%5B%5D A) %7B%0A        int l = A == null ? 0 : A.length;%0A        int%5B%5D bits = new int%5B32%5D;%0A        int res = 0;%0A        for (int i = 0; i %3C 32; i++) %7B%0A            for (int j = 0; j %3C l; j++) %7B%0A                bits%5Bi%5D += A%5Bj%5D %3E%3E i & 1;%0A            %7D%0A            res += (bits%5Bi%5D %25 3) %3C%3C i;%0A        %7D%0A        return res;%0A    %7D%0A%7D%0A

single number ii