Fetching data...
This may take a moment
Back
2617. Time Taken to Cross the Door
Hard
Array
Queue
Simulation
Solve on LeetCode
View Solutions
Description
Hints
Hint 1
Use a queue to store the people who want to enter or exit and their corresponding times.
Hint 2
Simulate the process described in the statement and apply the 4 rules to the people crossing the door.
Similar Questions
The Latest Time to Catch a Bus
Medium
Statistics
Acceptance
49.9%
Submissions
27,332
Accepted
13,649