End of Year Sale: Use Coupon Code END2025 to Get Extra 25% Off.
count to 0 and candidate to None.num in nums.
a. If count is 0, set candidate to num.
b. If num is equal to candidate, increment count.
c. Otherwise, decrement count.candidate as the majority element.