6. TikTok Reel Impact
Problem Description
In the dynamic landscape of TikTok, creators are in a constant race to boost their videos' engagement and reach by leveraging new features that enhance their content.
Each creator starts with a set of m
videos represented by initialReelImpacts
, which indicates the baseline popularity of each reel. For the next n
days, TikTok releases new trending features represented by newReelImpacts
, offering an additional boost to the creator’s existing reels.
On each of the next n
days, the following takes place:
- The creator appends the new features represented by
newReelImpacts[i]
(where0 ≤ i < n
) to their current reels. - Review the updated lineup, select the
k
th most impactful reel based on its popularity, and add its impact value to their total impact score.
Example
If k = 1
, the creator selects the reel with the highest popularity;
if k = 2
, the creator selects the reel with the second highest popularity, and so on.
Input
Given two integer arrays:
initialReelImpacts
of lengthm
newReelImpacts
of lengthn
And an integer k
.
Task
Calculate the creator’s total impact score after incorporating all elements from newReelImpacts
across n
days.
Note
The initial impact score of the creator is considered to be the k
th highest impact value from the initial set of initialReelImpacts
.
7. Clean Up Captions
Problem Description
As a TikTok developer, you're working on a project to clean up captions and optimize storage. With millions of captions and hashtags circulating the platform, your task is to detect any overlap between captions on the for_you
feed and the following
feed.
However, it's not just about finding common words or hashtags; you need to identify any common substring between the two.
Input
You are given two lists of captions — one from the for_you
feed and another from the following
feed. For each corresponding pair of captions, your job is to check if any substring appears in both captions.
Output
If a common substring is found, return "YES"
; otherwise return "NO"
.
Example
n = 3
for_you = ['ba', 'md', 'rj']
following = ['af', 'ee', 'rf']
Make the following decisions:
for_you[i] | following[i] | Common Substring | Result |
---|---|---|---|
ba | af | a | YES |
md | ee | - | NO |
rj | rf | r | YES |
我们长期稳定承接各大科技公司如TikTok、Google、Amazon等的OA笔试代写服务,确保满分通过。如有需求,请随时联系我们。
We consistently provide professional online assessment services for major tech companies like TikTok, Google, and Amazon, guaranteeing perfect scores. Feel free to contact us if you're interested.
