Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Model entity relationships as a directed graph to track permission flows.
Identify the single user who can reach every camera through ownership and group membership.
Use graph traversal to compute reachable entities per user and compare against the complete camera set.
What This Tests
Graph modeling from flat relational data
Breadth-first search and reachability analysis
Set operations and collection comparison
Handling acyclic hierarchical structures
Common Patterns
Graph Traversal
BFS
Hashing
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Report
Report seen similar question in interview
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Python3
Auto
Debug
Run
Submit
Test Cases
Input
permissions =
Output
Expected