(target, position, speed)
| 7 | * @return {number} |
| 8 | */ |
| 9 | var carFleet = function (target, position, speed) { |
| 10 | const coordinates = getCoordinates( |
| 11 | target, |
| 12 | position, |
| 13 | speed, |
| 14 | ); /* Time O(N * log(N)) | Space O(N) */ |
| 15 | |
| 16 | return searchAscending(coordinates); /* Time O(N) | Space O(N) */ |
| 17 | }; |
| 18 | |
| 19 | var getCoordinates = (target, position, speed) => |
| 20 | position |
nothing calls this directly
no test coverage detected