Airbnb interview question

It was a non-standard coding problem