

The first line contains an integer ‘T’ denoting the number of test cases. Then each test case follows.
The first input line of each test case contains an integer ‘N’ denoting the total number of votes cast.
Each of the next ‘N’ lines contains the name of the candidate who received the vote.
For each test case, print the name of the candidate who received the maximum number of votes.
Print the output of each test case in a separate line.
You are not required to print the expected output; it has already been taken care of. Just implement the function.
1 <= T <= 50
1 <= ‘N’ <= 10^3
1 <= |NAME| <= 20
Where ‘N’ is the number of votes cast and |NAME| denotes the length of the candidate’s name.
Time Limit: 1 sec
The basic idea of this approach is to iterate through each candidate and count the number of votes he/she has received. We will keep track of the candidate with maximum votes.
Here is the algorithm :
The basic idea of this approach is to use a HashMap to store the count of the votes received by each candidate.
Let unordered_map<string, int> getVotes which stores the votes received by a candidate.
Here is the algorithm: