Company: Visa_6nov
Difficulty: medium
Scooter Travel Simulation Problem Description Imagine that you are standing at the starting point of a street and are trying to reach the end of the street. This street is represented by a number line starting at 0 and ending at finish (finish > 0). There are electric scooters scattered along the street to help you get to the end. Specifically, the scooters are represented by an array scooters , with scooters[i] representing the location of the i-th scooter. Each scooter can travel up to 10 points along the number line before its battery is fully discharged and it cannot go further. For example, if a scooter is located at point 5, it can travel to points 5, 6, 7, ..., up to point 15 (inclusive), but it cannot get to point 16 or further. To get to the end point of the street, you must use the following algorithm: From the current position, travel to the nearest scooter to the right on foot. If there are no more scooters available, travel to the end point on foot. Get on this scooter and