Cars head to a target at given positions with given speeds; a faster car catching a slower one ahead forms a fleet that then moves at the slower car's speed (cars never pass). Return the number of fleets that arrive at the target. The input is JSON {target, position, speed}.
Input: JSON {target, position, speed}.
Output: Integer — the number of car fleets.
Input: {"target":12,"position":[10,8,0,5,3],"speed":[2,4,1,1,3]}
Output: 3
Explanation: Cars merge into 3 fleets.Input: {"target":10,"position":[3],"speed":[3]}
Output: 1
Explanation: A single car.Input: {"target":100,"position":[0,2,4],"speed":[4,2,1]}
Output: 1
Explanation: All merge into one.1<=n<=10^4