Capital One Interview Question

String related question, finding max height of students