TikTok Reel Impact (TikTok AMS)

Problem Overview

  • Compute the total impact score by taking the k-th highest reel impact from the initial set, then after each day’s new feature is added, and summing these values.
  • Input: initialReelImpacts (m), newReelImpacts (n), and k; Output: long total impact. Constraints: 1≤m,n≤1e5, 1≤k≤m, values ≤1e9.
  • Domain: TikTok creators boosting reel popularity as features roll out daily.
  • Source: TikTok interviews; a practical coding interview interview question problem.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: