Input:target = 12, position = [10,8,0,5,3], speed = [2,4,1,1,3]
Output:3
Explanation:The cars starting at 10 (speed 2) and 8 (speed 4) become a fleet. The car starting at 0 (speed 1) is a fleet by itself. The cars starting at 5 (speed 1) and 3 (speed 3) become a fleet.
Example 2:
Input:target = 10, position = [3], speed = [3]
Output:1
Explanation:There is only one car, hence only one fleet.
Example 3:
Input:target = 100, position = [0,2,4], speed = [4,2,1]
Output:1
Explanation:The cars starting at 0 (speed 4) and 2 (speed 2) become a fleet, meeting each other at 4. The car starting at 4 (speed 1) then joins this fleet.