Zillow interview question

Some question based on sorting