Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1503. Last Moment Before All Ants Fall Out of a Plank
Given a plank of length n and arrays of ant positions moving left or right, compute when the last ant falls off. Key insight: collisions simply swap identities, so treat ants as passing through and return the maximum time any ant needs to reach an edge (distance to nearest end in its moving direction).
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.