# Majority Number

Given an array of integers, the majority number is the number that occurs more than half of the size of the array. Find the number with O(n) time and O(1) space.

Example

Given `[1, 1, 1, 1, 2, 2, 2]`

, return `1`

Given an array of integers, the majority number is the number that occurs more than half of the size of the array. Find the number with O(n) time and O(1) space.

Example

Given `[1, 1, 1, 1, 2, 2, 2]`

, return `1`