Algorithm · ByteDance · Easy
Requirements Begin at position 0 and travel toward the integer target. At selected positions, you can place a package on a drone, which carries it exactly 10 units forward. Walk to the next available relay point, adding the distance walked to the total, and then use the drone to advance. Continue adding walking distances until your position reaches or exceeds target. A compatible function signature is: Constraints target is an integer. relay_points contains the positions at…