Skip to content

Moore's voting algorithm to find the majority element in an array #2016

@Pushpit07

Description

@Pushpit07

Is your feature request related to a problem? Please describe.
In an array A of N elements, find the majority element in the array. A majority element in an array A of size N is an element that appears more than N/2 times in the array.

Describe the solution you'd like
I would use Moore's voting algorithm to find the majority element in the array

Do you want to work on it
I want to work on this problem in C++

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions