Leetcode in Java && Oracle
421 subscribers
8 photos
397 files
400 links
Second channel: @codeforces_java

Let's Develop Together!
Download Telegram
image_2021-12-07_11-40-43.png
21.3 KB
#N169. Majority Element
problem link

#solution
class Solution {
public int majorityElement(int[] nums) {
Arrays.sort(nums);
return nums[nums.length/2];
}
}