from collections import Counter
class Solution:
    def majorityElement(self, nums: List[int]) -> int:
        dict_num=Counter(nums)
        for k,v in dict_num.items():
            if v>(len(nums)/2):
                return k
        
156e221df7b345040a79fb806157dc344ea0dc03
<mask token>

<mask token>


class Solution:
    <mask token>

<mask token>


class Solution:

    def majorityElement(self, nums: List[int]) ->int:
        dict_num = Counter(nums)
        for k, v in dict_num.items():
            if v > len(nums) / 2:
                return k

from collections import Counter


class Solution:

    def majorityElement(self, nums: List[int]) ->int:
        dict_num = Counter(nums)
        for k, v in dict_num.items():
            if v > len(nums) / 2:
                return k

from collections import Counter
class Solution:
    def majorityElement(self, nums: List[int]) -> int:
        dict_num=Counter(nums)
        for k,v in dict_num.items():
            if v>(len(nums)/2):
                return k
        