Spring Hire Sale
Limited Time Deal: Unlock all premium questions for over 30% off
$10.42$7.08
08
:
03
:
09
:
38
Back to Dashboard
Directory Permission Manager
Medium
Design a permission management system for a hierarchical file system. Implement the DirectoryPermissionManager class.
The directory hierarchy is provided as a list of [parent, child] edges at construction time. Permissions propagate downward: granting access to a directory also grants access to all of its subdirectories. Revoking access at a directory removes access to that directory and all of its subdirectories, even if a parent was previously granted access. Grants and revocations can be layered -- a subdirectory can be re-granted after its parent was revoked.
...