Company: kotak
Difficulty: medium
Maximum product sales Problem Description You are working in an E-commerce company. There are N products each having 10 9 items in it. The products are numbered from 1 to N. There will be Q customers who can do one of the following things: 1 R: Buys one item from each of the products that have product numbers in the range (1, R) (including both 1 and R) 2 L: Buys one item from each of the products that have product numbers in the range (L, N) (including both L and N) 3 C: Search for the most bought product which has a product number greater than or equal to C You have to build a search filter that will return the most bought item that the customer wants to find. If there are multiple products then return the product that has a minimum difference from the C that is as close as possible to the customer query. Find out the most bought product that the customer wants to find. Function description Complete the function solve() . This function takes the following 3 parameters and returns the