Company: Tik Tok
Difficulty: medium
TikTok Creator Support You\'re managing TikTok\'s viral trend team, responsible for boosting the platform\'s popularity by working with content creators. Each content creator on TikTok has an impactValue associated with them, which represents the overall effect they have on the platform. The impactValue associated with the creators are of the following two types: Cost (Negative impactValue): Indicates a creator that incurs expenses and resources to achieve visibility and engagement. Yield (Positive impactValue): Indicates a creator that generates engagement and followers with minimal or no resource investment. Your task is to determine the optimal order for supporting the content creators to maximize TikTok\'s popularity by ensuring that the cumulative impactValue —the sum of all supported creators\' impactValues —remains positive for as many creators as possible. Given an array of creators\' impactValue of length n , find the maximum number of creators you can support while maintainin