Company: Linkedin_19_dec
Difficulty: medium
Maximum Meetings with Positive Effectiveness Problem Description A product manager has to organize n meetings with different people. Meeting with each person results in an increase or decrease in the effectiveness index of the manager. The manager wants to organize the meetings such that the index remains positive for as many meetings as possible. Find the maximum number of meetings for which the effectiveness index is positive. The index at the beginning is 0. Note: After the meetings begin, the index must remain above 0 to be positive. Example Given n = 4 and effectiveness = [1, -20, 3, -2] . One optimal meeting order is [3, -2, 1, -20] . The effectiveness index is positive for the first three meetings. After meeting 1 (value 3): index = 3. (Positive) After meeting 2 (value -2): index = 3 - 2 = 1. (Positive) After meeting 3 (value 1): index = 1 + 1 = 2. (Positive) After meeting 4 (value -20): index = 2 - 20 = -18. (Not positive) The index remains positive for 3 meetings. There is no