← MakeMyTrip questions

Maximum Distance to Closest Occupied Seat

Filed under MakeMyTrip

You are given a binary string representing a row of seats, where 1 represents an occupied seat and 0 represents an empty seat. Find and return the maximum distance from an empty seat to the closest…

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.