Majority Voting Algorithm