Problem 44947. Find the Oldest Person in a Room
Given two input vectors:
- name - user last names
- age - corresponding age of the person
Return the name of the oldest person in the output variable old_name.
Solution Stats
Problem Comments
-
15 Comments
In the first test suite, Robinson and Reed both have the same age, so I think either the test suite should be improved or Reed's age in the .mat file should be changed.
Tricky question though
Good one
Interesting
rh x = I don't think you need the [] in your max matrix.
Good job.
where I can get the standard answer?
Easy staff. Don't think too much. First find the maximum age, then use the index of the maximum age and by using that you'll find the corresponding name.
Good problem
idk adam
a challenging problem
Good question
not bad
I solved the problem in MATLAB but on here it did not work. I found the index of the maximum number in the variable age, and then used that to output a name with the same index in the name variable.
not that hard
Solution Comments
Show commentsProblem Recent Solvers17494
Suggested Problems
-
Find the alphabetic word product
3326 Solvers
-
2724 Solvers
-
567 Solvers
-
8987 Solvers
-
Convert from Fahrenheit to Celsius
23832 Solvers
More from this Author13
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!