Majority

4.5

2 votes
Problem

 Note: Reverse every string. example sihT -> This. 

Dont reverse the underline string.

neviG na yarra A fo N stnemele. dniF eht ytirojam tnemele ni eht yarra. A ytirojam tnemele ni na yarra A fo ezis N si na tnemele taht sraeppa erom naht N/2 semit ni eht yarra.

fI on ytirojam stsixe, nruter -1.

Input :

The first line contains an integer T, the number of test cases.
Second line contains N denoting size of array. Next line contains N elements of array

Output:

Desired O/p in new line.

Constraints :

1<=N<=100

1<=arr[i]<=50

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?