---
title: "Discussion on \"Moore Voting Algorithm\" | Hashnode"
description: "Discussion on \"Moore Voting Algorithm\". Suppose you are given an array of size n consisting of integers and you have to find the majority element which appears more than n/2 times.  \nOf course, the very first approach which will come to our mind is to sort the array and return the middle e..."
url: "https://hashnode.com/posts/moore-voting-algorithm/64a310ccc51dcd55f4146d60"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Moore Voting Algorithm](https://riyavaryani.hashnode.dev/moore-voting-algorithm?utm_source=hashnode&utm_medium=feed)

Suppose you are given an array of size n consisting of integers and you have to find the majority element which appears more than n/2 times. Of course, the very first approach which will come to our mind is to sort the array and return the middle e...

Jul 3, 2023 · 3 min read · riyavaryani.hashnode.dev  
Read the article

-   [#cpp](https://hashnode.com/tag/cpp)
-   [#algorithms](https://hashnode.com/tag/algorithms)
-   [#dsa](https://hashnode.com/tag/dsa)

## Written by

[Riya Varyani](https://hashnode.com/@riyavaryani)

@riyavaryani · Bangalore

  
[View profile](https://hashnode.com/@riyavaryani)

Learner | Software Engineer 👩🏻‍💻

## Responses 2

Markdown supported · ⌘↵ to post

[Adesh Khanna](https://hashnode.com/@theadeshkhanna)

[Jul 4, 2023](https://hashnode.com/posts/moore-voting-algorithm/64a310ccc51dcd55f4146d60/comment/64a442ae84ae15f092e91c77)

Great Explanation 👏

[Utkarsh Chakravarty](https://hashnode.com/@utchak160)

[Jul 4, 2023](https://hashnode.com/posts/moore-voting-algorithm/64a310ccc51dcd55f4146d60/comment/64a4379f84ae15f092e91af9)

Very well explained
