@@ -0,0 +1,477 @@
+package leetcode.majority_element;%0A%0A%0Apublic class Solution %7B%0A    public int majorityElement(int%5B%5D num) %7B%0A        int candidate = 0, counter = 0;%0A        for(int x : num)%7B%0A            if(counter == 0)%7B%0A                candidate = x;%0A                counter = 1;%0A            %7Delse%7B%0A                if(candidate == x)%7B%0A                    counter++;%0A                %7Delse%7B%0A                    counter--;%0A                %7D%0A            %7D%0A        %7D%0A        return candidate;%0A    %7D%0A%7D%0A

Add java solution for 169. Majority Element