Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.4K+ articles
Misc
7.7K+ articles
Arrays
4.2K+ articles
Hash
831+ articles
frequency-counting
745+ articles
Linked List
666+ articles
sliding-window
205+ articles
circular-array
43+ articles
Moore's Voting Algorithm
4+ articles
Majority Element
5 posts
Recent Articles
Minimum swaps of same indexed elements required to obtain a Majority Element in one of the arrays
Last Updated: 23 July 2025
Given two arrays arr[] and brr[] of length N, the task is to find the minimum number of swaps of the same indexed elements required such an element occurs at least half of...
read more
DSA
Majority Element
array-rearrange
cpp-map
frequency-counting
Majority Element II - Elements occurring more than ⌊n/3⌋ times
Last Updated: 28 March 2026
Given an array arr[] consisting of n integers, find all the array elements which occurs more than floor(n/3) times.Note: The returned array of majority elements should be...
read more
DSA
Majority Element
frequency-counting
Find the element in a linked list with frequency at least N/3
Last Updated: 15 July 2025
Given a linked list of size N consisting of a string as node value, the task is to find the majority string, having frequency greater than [N/3], in the linked list.Note: ...
read more
Linked List
Mathematical
Hash
DSA
Majority Element
Moore's Voting Algorithm
interview-preparation
frequency-counting
Majority element in a circular array of 0's and 1's
Last Updated: 31 August 2022
Given a circular array containing only 0’s and 1’s, of size n where n = p*q (p and q are both odd integers). The task is to check if there is a way such that 1 will be in ...
read more
Misc
Hash
DSA
Arrays
Majority Element
sliding-window
circular-array
Majority Element
Last Updated: 28 March 2026
Given an array arr[] of size n, find the element that appears more than ⌊n/2⌋ times. If no such element exists, return -1.Examples:Input: arr[] = [1, 1, 2, 1, 3, 5, 1]Outp...
read more
DSA
Arrays
Majority Element
Moore's Voting Algorithm
Microsoft
Amazon
Samsung
D-E-Shaw
Accolite
MakeMyTrip
FactSet
✕