Expedia Group interview question

Reverse a string, second max of the array