@@ -0,0 +1,471 @@
+public class Solution %7B%0A    /**%0A     * @param nums: a list of integers%0A     * @return: find a  majority number%0A     */%0A    public int majorityNumber(ArrayList%3CInteger%3E nums) %7B%0A        // write your code%0A        int res = 0;%0A        int cnt = 0;%0A        for (int num : nums) %7B%0A            if (cnt == 0) %7B%0A                cnt ++;%0A                res = num;%0A            %7D else %7B%0A                cnt += num == res ? 1 : -1;%0A            %7D%0A        %7D%0A        return res;%0A    %7D%0A%7D

Create MajNum for Lintcode