Ideally on two threads, one starting from one end, the other from the other end, checking when they reach each other.
Ideally on two threads, one starting from one end, the other from the other end, checking when they reach each other.