Company: Rippling
Difficulty: easy
Design an Employee Access Management System . The system tracks which employees hold which kind of access on which resources. There are multiple employees E1, E2, E3, ... En . There are multiple resources R1, R2, R3, ... Rn . There are exactly three access types: READ , WRITE and ADMIN . An employee may hold several different access types on the same resource at the same time. Access types are independent of one another — holding ADMIN does not imply READ or WRITE . Operations Your program must support the following four operations. GRANT employee_id resource_id access_type — grant that access type to the employee for that resource. Granting an access the employee already holds changes nothing. REVOKE employee_id resource_id access_type — remove that access type from the employee for that resource. If access_type is the literal word ALL , remove every access the employee holds on that resource. Revoking access that was never granted is silently ignored. GET_ACCESS emp