Question: Problem Statement Create a program that prints the majority vote in a list. A majority vote is an element that occurs > N / 2
Problem Statement
Create a program that prints the majority vote in a list. A majority vote is an element that occurs N times in a list where N is the length of the list
Examples
AABA
AAABCAA
ABBACC None
Notes
The frequency of the majority element must be strictly greater than
If there is no majority element, print nothing.
If the list is empty, print nothing.
Hint
You will want to use the count function first introduced in Runestone section
Sample Input
A B C B A B G B B
Sample Output
B
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
