You are given the positions of several houses and heaters along a one dimensional line. Every heater warms all houses within a chosen radius.
Implement findRadius to return the minimum radius required so that every house is warmed by at least one heater.
Constraints:
houses.length, heaters.length
houses[i], heaters[i] $\leq 10^9`
You are given the positions of several houses and heaters along a one dimensional line. Every heater warms all houses within a chosen radius.
Implement findRadius to return the minimum radius required so that every house is warmed by at least one heater.
Constraints:
houses.length, heaters.length
houses[i], heaters[i] $\leq 10^9`