Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Manage worker profiles and track office entry/exit events via monotonic timestamps.
Calculate total worked duration by accumulating only completed visit intervals.
Enforce unique worker IDs and return specific status codes for invalid operations.
What This Tests
Hash map design for O(1) state retrieval and updates
Object-oriented modeling and data encapsulation
State tracking logic for entry/exit cycles
Input validation and precise return type handling
Common Patterns
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!
python
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected