ended3월 20일· 3 sources

Majority Element – CA21

과반수 원소 찾기 – CA21

Why it matters

The article explains how to find a majority element (appearing more than n/2 times) in an array. It contrasts a HashMap-based O(n) space approach with the Boyer-Moore Voting Algorithm, which achieves O(1) space by maintaining a candidate and count, then verifying the candidate in a second pass.

3
Sources
+0
24h
Growth
185d
Active
boyer-mooreboyer-moore voting algorithmhash maphashmapjavamajority elementpython배열 빈도수선형 시간 알고리즘

Sources

Related Issues