---
title: "Discussion on \"Moore's Voting Algorithm\" | Hashnode"
description: "Discussion on \"Moore's Voting Algorithm\". Working\n\nLet the initial length be 1, because we are considering the first element as the initial element in our count.\n\nMove forward in the array and if the same element appears again, then increase the count by 1; if not, then decrease the count by..."
url: "https://hashnode.com/posts/moores-voting-algorithm/6686cad65949ae557f646b38"
---

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

Discussion

# [Moore's Voting Algorithm](https://ujjwalsharma.hashnode.dev/moores-voting-algorithm?utm_source=hashnode&utm_medium=feed)

Working Let the initial length be 1, because we are considering the first element as the initial element in our count. Move forward in the array and if the same element appears again, then increase the count by 1; if not, then decrease the count by...

Jul 4, 2024 · 2 min read · ujjwalsharma.hashnode.dev  
Read the article

-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#cpp-ck4ra5k7300nlv2s1jbkdp2qh](https://hashnode.com/tag/cpp-ck4ra5k7300nlv2s1jbkdp2qh)
-   [#dsa](https://hashnode.com/tag/dsa)
-   [#dailydoseofdsa](https://hashnode.com/tag/dailydoseofdsa)
-   [#moores-voting-algorithm](https://hashnode.com/tag/moores-voting-algorithm)

## Written by

[Ujjwal Sharma](https://hashnode.com/@ujjwalsharma)

@ujjwalsharma · New Delhi

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

Thriving the way to success

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
