Leetcode 2532. Time to Cross a Bridge
Simulate a priority-driven scheduling problem where k workers, each with times to cross right, pick, cross left, and put, must move n boxes across a single-occupancy bridge; return the time when the last box-carrying worker reaches the left side. The twist is that when the bridge is free you must always choose the least-efficient eligible worker (by left+right time, tie-broken by index) from the right side first, otherwise from the left, and never dispatch more than n workers to fetch boxes.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.