There can be two methods considering hashmap and sorting to solve the "Majority Element Problem". But, we love the most optimized way, i.e. the Moore's Voting Algorithm.