Who Gets In
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L5
Problem
A permission service replays a stream of access changes: `grant` and `revoke` add or drop a single permission for one user, `check` asks whether a user currently holds a given permission, and `update_config` hands over a whole user-to-permissions mapping that replaces every permission on record. Most operations name an action, a user, and a permission, but `update_config` carries only the action and the mapping. Return the boolean answer to each `check` in order, and treat a user you have never seen as holding nothing.
Summary
When the roster changes, does access follow?
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.