Leetcode 849. Maximize Distance to Closest Person
Given a binary array where 1s are occupied seats, find an empty seat that maximizes the distance to the nearest occupied seat. The core challenge is identifying the longest runs of zeros (with edge runs counted fully and interior runs giving half the run length) to compute the maximal minimum distance.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.