Spring Hire Sale
Limited Time Deal: Unlock all premium questions for over 30% off
$10.42$7.08
08
:
03
:
13
:
51
Back to Dashboard
EV Charging Optimizer
Medium
An electric vehicle travels along a highway between a start and a destination. Charging stations are located at positions given in a non-decreasing integer array stations, where stations[0] is the start and the last element is the destination. You are allowed to add at most k extra charging stops at any positions along the highway.
Your goal is to minimize the maximum gap between any two consecutive stops after placing the extra stops optimally. Return the minimized maximum segment length as an integer. ...