Boyer–Moore majority vote algorithm

버전 1.0.0.0 (1.45 KB) 작성자: Reza Ahmadzadeh
Boyer–Moore majority vote algorithm
다운로드 수: 241
업데이트 날짜: 2015/12/9

라이선스 보기

%% Boyer–Moore majority vote algorithm
% The Boyer-Moore Vote Algorithm solves the majority vote problem in
% linear time O(n) and logarithmic space O(\log n). The majority vote
% problem is to determine in any given sequence of choices whether
% there is a choice with more occurrences than all the others, and if so,
% to determine this choice. Mathematically, given a finite sequence
% (length n) of numbers, the object is to find the majority number
% defined as the number that appears more than floor(n/2) times.%
%
% Example:
%
% consider we want to find the majority element in 'aaaccbbcccbcc'
% MajorityVote('aaaccbbcccbcc')
% ans =
% c
%

인용 양식

Reza Ahmadzadeh (2026). Boyer–Moore majority vote algorithm (https://kr.mathworks.com/matlabcentral/fileexchange/54394-boyer-moore-majority-vote-algorithm), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2007a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Genetic Algorithm에 대해 자세히 알아보기
버전 게시됨 릴리스 정보
1.0.0.0