Day 20 of LeetCode Challenge
Problem 1: Majority Element
Link to the problem: https://leetcode.com/problems/majority-element/
class Solution {
public int majorityElement(int[] nums) {
HashMap<Integer, Integer> map = new HashMap<>();
for(int i:nums){
...
tusharpant.hashnode.dev2 min read