Algorithm · Pinterest · Medium
Problem: Total Scooter Travel Needed to Arrive at the Finish Begin at coordinate 0 on a number line, with the goal of reaching finish (finish > 0). Electric scooters are positioned along the street and provided in the integer array scooters; scooters[i] denotes the position of scooter i, and no two positions are the same. A scooter may move no more than 10 units rightward from where it is placed, including its endpoint. For instance, a scooter located at 6 can travel through…
Checking your access…