Compute split-stay listing pairs | Airbnb Interview Question