I literally didn't understand the data type of `employees` from the question

  • 2

    The question says type employees: Employee, which seems like employees is a node of class Employee. However, it's obvious that the class Employee only contain information of 1 employee, and employees should contain information of ALL employees. So I had a hard time figuring out how to extract every employee's information from employees because the question doesn't really say it. I had to read others' solution to figure out what it actually means. I don't know whether this is a usual way of describing data type, but I think this is very confusing. Even List[Employee] or map(Employee) or whatever would be a better description.

  • 0


Log in to reply

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