Given two arrays, one is array of political parties namely - party, and their corresponding array of seats received - seats. You have to print the political parties in lexicographical sorted order along with their seats, and highest seats received by the party.
The first line of input contains T denoting the number of testcases. T testcases follow. Each testcase contains three lines of input. The first line contains number of parties N. The second line contains the names of the parties. The third line contains the votes corresponding to each party.
For each testcase, in a new line, print the required answer.
Your task is to complete the function Election2019(party, seats, n) which accepts three arguments and prints the required result.
1 <= T<= 100
1 <= N <= 26
1 <= seats <= 543
A B C D E F G
90 150 33 23 17 500 2
We print parties and their respective seats in lexiographically sorted order. At the end we print the maximum seats.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.