Given the daily calander of every employee in a company, create a simple meeting scheduler.
Given an employee, try to optimize the daily calander.
vector<Employees> employees;
enum Designation { CEO, CTO, MANAGER, SR_EMPLOYEE, EMPLOYEE };
class Employees {
public:
int empId;
Designation designation;
vector<Interval> meetings; // daily meeting calander.
}
class Interval {
public:
int start, end; // [start, end) start is inclusive and end is exclusive.
}
If employee A has conflicting meetings with employee B and employee C then
- A will attend the meeting with employee of higher designation. For example if B is CEO and C is Manager then A will attend meeting with B and cancel meeting with C.
- A can attend either meeting if the designation for them is same.
- Try to optimize for as many meetings as possible without any conflicts and remove other meetings from the list.