Problem 44078. GJam 2017 Kickstart: Leader (Small)
This Challenge is derived from GJam 2017 Kickstart Leader. This is the first 61 small cases with no spaces in names.
Google Code Jam 2017 Qualifier is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.
The GJam story is to determine the rightful leader. The leader is the person whose name utilizes the most unique letters, spaces do not count, and if two or more people are tied then the leader is the one whom comes first alphabetically, with space preceding A, given a list of 100 or fewer names.
Input: [names], a cell array of names using only A thru Z; max 100 names
Output: [Leader], a string of the name of the leader
Examples: [names] [Leader]; {'ADAM' 'BOB' JOHNSON'} ['JOHNSON']
For the example the first two have three and two unique letters while JOHNSON has five unique letters 'JOHNS'.
Theory: Brute force processing appears to be the way. Methodical processing and function usage can minimize code size. GJam Kickstart solutions(C++,Python).
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers18
Suggested Problems
-
6017 Solvers
-
1372 Solvers
-
1623 Solvers
-
Set the array elements whose value is 13 to 0
1362 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
375 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!