My accepted solution, 813ms


  • 3
    A
    select  IF(count(*) >= N, Min(rank.Salary), NULL) salary
    from (select distinct salary
          from Employee     
          order by salary desc
          limit N
     ) rank

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.