PayPal interview question

Building Bridges problem-- cities on 2 ends, connect them