Company: Amazon_3july
Difficulty: medium
E-commerce Return Routing Engine An e-commerce platform routes every return request to one of three outcomes: AUTO_APPROVE , MANUAL_REVIEW or REJECT . Alongside the outcome the engine reports an integer risk score and a short reason code. The engine is driven entirely by configuration that is handed to it on standard input: the category rules, the scoring weights, the decision bands, the customer return histories and the links between accounts that belong to the same customer. Your job is to run the engine over a batch of requests. The routing rules For one request with category cat , account acc and days_since_purchase days elapsed, the engine applies these checks in this order and stops at the first one that fires. Unknown category. cat does not appear in the category rules. Decision REJECT , score not_returnable_score , reason unknown_category . Category not returnable. cat is known but its returnable flag is 0 . Decision REJECT , score not_returnable_score , reason category_not_ret