StreetEasy Interview Question

Coding challenge