Maximize Distance to Closest Person at Yandex

Medium49.6% acceptance

This problem has 87.5% frequency at Yandex.

Problem Description

You are given an array representing a row of `seats` where `seats[i] = 1` represents a person sitting in the `ith` seat, and `seats[i] = 0` represents that the `ith` seat is empty **(0-indexed)**. There is at least one empty seat, and at least one person sitting. Alex wants to sit in the seat such...

Read full problem and hints

Topics

Also asked at 7 companies


More Yandex Questions

View all Yandex questions