Fundamentals
/
Turnstile | Hackerank SHL
⏸
00:00
↻
← Prev
Next →
▶
Question
Given n customers with arrival times and direction (0 = exit, 1 = enter), and a turnstile that allows one person per second with the rule that exit takes priority unless someone just used it for entry, return the time each customer crosses.
▶
Understand
▶
Approach
▶
My Code
▶
Reference Solution
Compare
11