You are given a floating point value hour, representing the total time available to reach your destination, and an integer array dist of length n, where dist[i] represents the distance of the
Each train can only depart at an integer hour, which means you may have to wait before boarding the next train. For example, if a train journey takes
Return the minimum positive integer speed that all trains must maintain to arrive within hour hours. If it is impossible to reach the destination on time, return
Constraints:
n == dist.length
n
dist[i]
hour
There will be at most hour.
You are given a floating point value hour, representing the total time available to reach your destination, and an integer array dist of length n, where dist[i] represents the distance of the
Each train can only depart at an integer hour, which means you may have to wait before boarding the next train. For example, if a train journey takes
Return the minimum positive integer speed that all trains must maintain to arrive within hour hours. If it is impossible to reach the destination on time, return
Constraints:
n == dist.length
n
dist[i]
hour
There will be at most hour.