Infosys interview question

Reverse a string, find second highest salary