LeetCode: Majority Element Jun 24 2015 1234567891011/** * Created by hzhou on 4/23/15. [email protected] */public class MajorityElement { public int majorityElement(int[] nums) { assert nums.length > 0; Arrays.sort(nums); return nums[nums.length / 2]; }}