Time Limit Exceeded error on apparently correct solution

  • 0
    select Department.Name as Department, Employee.Name as Employee, T1.Salary from (select DepartmentId, Max(Salary) as Salary from Employee Group by DepartmentId) as T1, Department, Employee where Department.Id=T1.DepartmentId and Employee.DepartmentId=Department.Id and T1.Salary=Employee.Salary;

    I receive TLE from Leetcode platform. Why?

Log in to reply

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