Find minimum number of towers which cover maximum number of houses
0 Answers
Find minimum number of towers which cover maximum number of houses
| Flag | PURGE
Consider a long straight road from left to right with houses scattered along the road (you can think
of houses as points on the road). You would like place cell phone towers at some points on the road so
that each house is within 4 kilometers of at least one of these towers. Describe an efficient algorithmwhich achieves this goal and uses as few cell phone towers as possible.
Hint: Consider a solution where each tower is located as much to its right as possible (without
changing the number of towers). How would you construct such a solution ?
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.