Pinterest logoPinterest
Coding·60 minMembers

Grant / Revoke / Check Access on Hierarchy

Members only

Design an access-control class on a static hierarchy (world → country → city). `grant_access(entity, group)` and `revoke_access(entity, group)` must be O(1); `check_access(entity, group)` is O(depth) ...

SWE
tree
tree-broadcast
hashmap
access-control
object-design
medium
Frequency
Low
Last asked
2026-08-21
Stage
phone-screen · onsite-coding

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...