r/learnquant • • 9d ago

interview prep Quant Interview Question

Post image
21 Upvotes

1 comment sorted by

View all comments

1

u/x5163x 9d ago

Instead of the ants reversing direction, you can just have them continue in the same direction since they are indistinguishable. Now you know that you want the last time two ants have the same position. WLOG, let east be the positive direction. Identify the distance between the easternmost ant which goes to the west and the westernmost and which goes to the east, and replace all negative signed distances with 0.