Desquared interview question

Algorithms Arrays and Strings Get Second Largest Element