Create an employee directory structure that stores employee information for a company. Include manager direct reports.
Implement the following functions:
- AddEmployee
- Adds an employee to the company directory
- RemoveEmployee
- Removes an employee from the company directory
- GetDirectReports
- Returns a list of the direct reports for a given manager
- GetEmployee
- Returns the employee information
This problem asks you to design an employee directory that stores both employee records and reporting relationships. A typical solution uses a hash map for fast employee lookup and an employee object that tracks the manager and direct reports. The main challenge is keeping the hierarchy consistent when adding or removing employees, especially updating the manager’s report list correctly.