← MakeMyTrip questions
CodingModerate

Maximize distance to closest person

Filed under MakeMyTrip

You are given an array of integers seats where each seats[i] is 1 or 0, representing a person sitting in that seat or an empty seat. There is at least one 2 person and at least one empty seat. Find…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related MakeMyTrip questions

Collected from public candidate posts and coding forums. Updated Nov 2026.