Wayfair interview question

A coding design problem regarding scores