Zillow interview question

Totally 2 problems and both are easy.