Let’s take there are two ants. Considering worst possible case we can see easily the required time is same as the time taken by an ant to reach one extreme point to another extreme point. Which will be same when there are 1000 ants i.e.. max time = 100/50 min = 2 min