Find the 2nd Highest Employee Salary
Asked in the technical round 1 stage. The original discussion gave LIMIT/OFFSET first, and the interviewer asked for an alternative using a subquery.
Implement the coding equivalent using an array of salaries.
second_highest_salary(salaries) receives a list of integers and returns the second distinct highest salary. Return None if fewer than two distinct salaries exist.
def second_highest_salary(salaries):