Farthest Seat Assignment
Design the assignment behavior for a row of n seats numbered from 0 to n - 1. Each call assigns one unoccupied seat to a new employee. The chosen seat must maximize the distance to the nearest occupied seat. If multiple seats have the same best distance, choose the smallest seat index.
Return the first count assigned seats. If count is larger than n, return only the n actual assignments.
1Example 1
The first two assignments take the ends. The third assignment chooses seat 4, which is one of the middle seats farthest from 0 and 9; ties use the smaller index.
2Example 2
Only three seats exist, so only three assignments are returned.
Constraints
Limits and guarantees your solution can rely on.
When no seats are occupied yet, assign seat 0.