Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1870. Minimum Speed to Arrive on Time
Find the minimum positive integer speed such that, when intermediate trains can only depart at integer hours (so each of the first n-1 rides contributes ceil(dist[i]/speed) hours and the last ride contributes dist[n-1]/speed hours), the total commute time ≤ hour; return -1 if no such speed exists. This is a monotonic feasibility check over speed (suitable for binary search).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.