Company: Amazon_9may
Difficulty: medium
Return Routing Problem An e-commerce platform must decide what to do with every return request a customer files. Some returns are approved automatically, some are queued for a human, and some are rejected outright. The decision is driven by two things: policy (is the category returnable, and is the request still inside the return window?) and risk (how much returning has this customer already done, counting every account they are linked to?). The routing engine is fed six configuration and data files. Your job is to apply the routing rules to every return request and produce the results file. Input The whole file set arrives on standard input as a single JSON object on one line. Its keys are the six file names and its values are the text contents of those files: key contents data/category_rules.json JSON array of category rules data/scoring_rules.json JSON array of scoring rules data/decision_bands.json JSON array of decision bands data/account_profiles.jsonl JSON Lines: one account pr