Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Friday, Dec 4.Claim the deal

A shop records prices manually when products are sold. You are given distinct catalog product names in products and their correct prices in productPrices. You are also given the sold products in productSold and the prices entered for those sales in soldPrice. Every value in productSold appears in products.

For every sale at index j, productSold[j] identifies the product and soldPrice[j] is its entered price. Its correct price is the corresponding value in productPrices.

Test Cases
Input
Output
Expected