Display longest name
Submissions: 3019   Accuracy:

44.8%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!
       

Given a list of names, display the longest name.

Input:
First line of input contains an integer T, the number of test cases. For each test case, there will be two lines. First line contains integer N i.e. total number of names, and second line contains N space seperated names of different length.

Output:
Longest name in the list of names.

Constraints:
1 <= T <= 10
1 <= N <= 10

1 <= |length of name| <= 1000

Example:
Input:
1
5
Geek
Geeks
Geeksfor
GeeksforGeek
GeeksforGeeks

Output:
GeeksforGeeks

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Harsh Agarwal
Author: harsh.agarwal0


Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.