Airbnb interview question

The overall coding challenge is not difficult