Airbnb interview question

Leetcode hard level problem on graphs