</>OfferRetriever
DashboardDiscuss
NEW

Spring Hire Sale

Limited Time Deal: Unlock all premium questions for over 30% off

$10.42$7.08

08

:

04

:

55

:

48

Get this deal
Back to Dashboard

[CodeSignal] Maximum Product Rating

Hard

The engineers at Amazon are working on a new rating system for their products. For each product, an array customer_rating is maintained for the last n orders of that product, where the rating given by the i-th customer is represented by customer_rating[i].

The following algorithm is used to calculate the new_rating of the product: ...