Wayfair Interview Question

A coding design problem regarding scores