Company: Flipkart
Difficulty: medium
The current selected programming language is C++20 . We emphasize the submission of a fully working code over partially correct but efficient code. Once submitted , you cannot review this problem again. You can use cout to debug your code. The cout may not work in case of syntax/runtime error. The version of GCC being used is 5.5.0 . Maximum Product Transportation There are N trolleys used to transport products and each trolley is given a unique ID from 0 to N-1. A trolley operates for a certain time period and is able to carry products. For each trolley, the automated system stores three parameters i.e., the start and end time of operation (both inclusive) and units of products carried. A trolley can be operated within a specified period. No two trolleys can be operated during the same period, but if a trolley\'s operating period ends at point T, then another trolley can be immediately started at T. The system must store the maximum number of products transported. Write an algorithm t