A lot of folks get tripped up by the majority part of this problem. The majority
element is not the number with the most occurrences, but rather, it's the number value with >= 50% of "occurrences".

The brute force solution would be manually iterate through and count the appearances of each number in a nested for-loop, like such: given an array [4, 2, 4]
:
- iterate through for
4
s, find 2 counts of4
- iterate through for
2
s, find 1 count of2
- Realize that
2 > 3/2
(over half), so return 4