Feature #8: Maximum Signal Strength
Implement the "Maximum Signal Strength" feature for our "Cellular Operator AT&T" project.
We'll cover the following
Description
In a busy city center, our cellular operator surveys an aisle in a mall, where each aisle has several stores. They identify stores within the aisle where cellular network signals are satisfactorily high and where they are unacceptably low.
The result of the study was stored in the form of an array of 0
s and 1
s. Each entry in the array corresponds to a store in the aisle. If the value in a cell of this array is 1
, then this means that the corresponding store has a satisfactory signal strength. However, a 0
in the cell means that the store does not have satisfactory signal strength.
The operator wants to deploy signal repeaters to enhance the user experience and provide better signal strength in the stores. The operator has a strict budget and can only afford k
repeaters for an aisle.
Note: The
k
repeaters may not cover all the stores, and an individual repeater can only strengthen the signal in a single store.
We want to deploy the signal repeaters to get the maximum continuous stretch of stores in the aisle that have acceptable coverage for the users.
The following illustration will help clarify this behavior:
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.