Airbnb Interview Question

Coding question about graph traversal