Question: Problem 5 Let's consider a long river, along which n houses are scattered. You can think of this river as an axis, and the houses

Problem 5 Let's consider a long river, along which n houses are scattered. You can think of this river as an axis, and the houses are given by their coordinates on this axis in a sorted order. Your company wants to place cell phone base stations at certain points along the river, so that every house is within 4 kilometers of one of the base stations. Give an O(n)-time algorithm that minimizes the number of base stations used, and show that it indeed yields the optimal solution
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
