Wayfair interview question

Two case questions.