[TikTok] OA 2025 start – 25 Apr (generic)

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] (where 0 ≤ i < n) to their current reels.
  • Review the updated lineup, select the kth 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 length m
  • newReelImpacts of length n

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 kth 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 SubstringResult
baafaYES
mdee-NO
rjrfrYES

我们长期稳定承接各大科技公司如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.

Leave a Reply

Your email address will not be published. Required fields are marked *