Company: Visa_3Dec
Difficulty: medium
Drone Delivery Description You are designing a delivery system using drones in a linear warehouse. The warehouse is represented as a number line starting at position 0 and ending at position target ( target > 0 ). Along this line, there are charging stations placed at various positions, represented by an array stations , where stations[i] is the position of the i-th charging station. Each drone has a limited battery that allows it to travel a maximum of 10 units after being fully charged. For example, if a drone is charged at position 12 , it can travel to positions 12, 13, 14, ..., up to position 22 (inclusive), but cannot reach position 23 or beyond without recharging. Your delivery protocol requires the following steps: From your current position, pick up the cargo and carry it on foot to the nearest charging station ahead of you. If there are no more stations ahead, carry the cargo on foot to the target position. Deploy a fully charged drone from this station and send it with the c