Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit448415c

Browse files
author
Mrinal Chauhan
committed
feat: added find majority element in array using Moore's Voting Algorithm
1 parent8d44461 commit448415c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎Data-Structures/Array/MooreVotingAlgorithm.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ const MooreVotingAlgorithm = (arr) => {
3030
}
3131

3232
returncount>arr.length/2 ?candidate :null;
33-
};
33+
};
34+
export{MooreVotingAlgorithm};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp