Ezvor

2534. Time Taken to Cross the Door

HardArray Preparing judge… LeetCode
ArrayQueueSimulation

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.