Question d’entretien chez HSBC

2 sum problem from leetcode How to find the second highest salary