Effective Manager
Learn this problemProblem statement
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.
Function
maxMeetings(effectiveness: int[]) → int
Complete the function maxMeetings in the editor.
maxMeetings has the following parameter:
int effectiveness[n]: the increase or decrease effectiveness for each meeting.
Returns
int: the maximum possible number of meetings while maintaining a positive index
🐳 ♫⋆。♪ ₊˚♬ ゚Credit to robotᯓᡣ𐭩
Examples
Example 1
effectiveness = [1, -20, 3, -2]return = 3Constraints
More Akuna Capital problems
- Binary CircuitSeen Jul 2026
- Minimize Malware Spread by Removing a NodeOA · Seen Jul 2026
- Sort Array by FrequencyOA · Seen Jul 2026
- Array Challenge (QR Intern)OA · Seen Jul 2026
- Communications HandlerOA · Seen Jul 2026
- K Smallest SubstringOA · Seen Jul 2026
- Maximum K-Star SumOA · Seen Jul 2026
- Delivery Management SystemOA · Seen Jul 2026