Directory Permission Manager
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.
...
More Pinterest interview questions
- EV Charging Optimizermedium
- Audit Log Analyzermedium
- Remove a Forest Subtreemedium
- Scooter Street Ride Simulationeasy
- Distribute Ads Across Columnseasy
- Find Unallocated Bucket ID Rangesmedium
- Single Bubble Explosionmedium
- Game Level Trackermedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.