Given an array nums of size n, return the majority element — the element that appears more than ⌊n/2⌋ times. You may assume it always exists.
Input: one line of space-separated integers. Output: the majority element.
3 2 3
3
2 2 1 1 1 2 2
2
Run your code against the sample tests, or Submit to run the full suite.