Tiktok Viral Challenge
Problem Overview
- Count unique non-empty substrings of a video where non-viral letters (per engagementArray) do not exceed k.
- Inputs: string video (length n), integer k, engagementArray[26] with 0/1 for 'a'–'z'; Output: integer count of qualifying substrings.
- Constraints: 1≤n≤1500, 1≤k≤n, engagementArray[i]∈{0,1}.
- Real-world: model TikTok segment engagement to flag promising clip combinations.
- Asked in TikTok interviews; a coding interview problem and interview question.
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:
