← Back to blog TikTok OA 2026 Real Questions: 3 MCQs + 2 Hard Coding Problems Walkthrough (CodeSignal)
TikTok

TikTok OA 2026 Real Questions: 3 MCQs + 2 Hard Coding Problems Walkthrough (CodeSignal)

2026-05-14

TikTok's 2026 OA is the canonical CodeSignal MCQ + Hard Coding hybrid: 3 MCQs (statistics + algorithm intuition + probability) plus 2 Hard coding problems (parenthesis efficiency maximization + weight-sort min operations). The MCQs look easy but every option list has plausible distractors; the coding tier matches LeetCode Hard, with two ACs in 60 minutes being the standard pass bar. This article walks through every problem with derivations, full Python solutions, and CodeSignal-specific traps.

TikTok 2026 OA Overview

Dimension Detail
Platform CodeSignal
Duration 70 minutes
Questions 3 MCQ + 2 Coding
Difficulty MCQ Easy ~ Medium / Coding Hard
Pass threshold Total ≥ 75%
Target roles TikTok SWE / Backend / Algo Engineer

MCQ 1: Minimum Cost to Build a String

Problem

S starts empty. You may repeatedly:

What's the minimum cost to build "abhibhibhi"?

Options: A. 35 / B. 30 / C. 25 / D. 20

Derivation

Answer: B. 30

Key

MCQ 2: Brodie Helmet Statistical Bias

Problem

When the Brodie helmet was introduced in WWI, field hospitals saw a sharp rise in severe head-injury admissions. Command considered redesigning until a statistician noted that soldiers previously killed by shrapnel were now surviving and showing up in hospitals.

Which bias is illustrated?

Options: A. Sampling Bias / B. Confirmation Bias / C. Survivorship Bias / D. Susceptibility Bias

Reasoning

Answer: C. Survivorship Bias

Classic case of unobserved samples (KIA soldiers) being systematically removed, biasing inference on the survivors.

TikTok Scoring Note

TikTok cares whether you can distinguish these four—candidates with "I A/B-tested my model" on resumes get probed on sampling vs. survivorship distinctions in technical screens.

MCQ 3: Mean / Median / Mode in a Right-Skewed Distribution

Problem

For a right-skewed (positively skewed) distribution, which are correct? (Choose all that apply.)

Reasoning

Answer: A and C

The right tail pulls the mean up: mean > median > mode. So A and C hold; B and D are wrong. Standard for TikTok DS-adjacent roles.

Coding 1: Parenthesis Efficiency Maximization

Problem

Given a parenthesis sequence s plus a kit of parentheses kitParentheses with efficiency ratings efficiencyRatings, insert zero or more from the kit so the final sequence is balanced, and maximize the sum of inserted ratings.

Output: maximum efficiency.

Approach

Insight: the required additions are determined by s—after a single linear scan, find the count of unmatched ) (must add ( in front) and unmatched ( (must add ) at the end). The kit's parentheses have signed ratings, so:

  1. Required inserts: pick the highest-rated matching kit pieces
  2. Optional inserts: every additional ( + ) pair counts only if its sum > 0

Step 1: Count unmatched

def count_unmatched(s):
    open_cnt, close_cnt = 0, 0
    for c in s:
        if c == "(":
            open_cnt += 1
        else:
            if open_cnt > 0:
                open_cnt -= 1
            else:
                close_cnt += 1
    return open_cnt, close_cnt

Step 2: Group the kit + greedy

import heapq
from typing import List

def max_efficiency(s: str, kit: List[str], ratings: List[int]) -> int:
    open_cnt, close_cnt = count_unmatched(s)

    left_pool = []
    right_pool = []
    for c, r in zip(kit, ratings):
        if c == "(":
            heapq.heappush(left_pool, -r)
        else:
            heapq.heappush(right_pool, -r)

    total = 0

    for _ in range(close_cnt):
        if not left_pool:
            return -1
        total += -heapq.heappop(left_pool)

    for _ in range(open_cnt):
        if not right_pool:
            return -1
        total += -heapq.heappop(right_pool)

    while left_pool and right_pool:
        l = -left_pool[0]
        r = -right_pool[0]
        if l + r > 0:
            heapq.heappop(left_pool)
            heapq.heappop(right_pool)
            total += l + r
        else:
            break

    return total

Time: O(K log K), K = kit size
Space: O(K)

Hidden cases

Input Expected
s = "((", kit all ) Must add 2 )
All kit ratings negative Add only the required ones
s already balanced + kit all positive Greedily add (+) pairs

Coding 2: Minimum Operations to Sort by Weight

Problem

n points; the i-th has weight[i] and starts at position i. Each operation moves point i right by dist[i]. Find the minimum number of operations to sort the array by weight ascending.

Input:

n = 4
weight = [3, 6, 5, 1]
dist = [4, 3, 2, 1]

Output: 5

Approach

The simplification: assign each element its target rank in the weight-sorted order. Since elements can only move right, an element whose target rank is to its left must be passed over by other elements moving right.

Greedy O(n²)

from typing import List

def min_ops(n: int, weight: List[int], dist: List[int]) -> int:
    target = sorted(range(n), key=lambda i: weight[i])
    target_index = {orig: rank for rank, orig in enumerate(target)}

    ops = 0
    arr = list(range(n))
    while True:
        progressed = False
        for i in range(n - 1):
            if target_index[arr[i]] > target_index[arr[i + 1]]:
                ops += 1
                arr[i], arr[i + 1] = arr[i + 1], arr[i]
                progressed = True
                break
        if not progressed:
            break
    return ops

Time: O(n³) worst case; CodeSignal hidden cases stay at n ≤ 50
Space: O(n)

O(n log n) via inversion count

Each inversion in the "target permutation" needs at least one operation:

def count_inversions(arr: List[int]) -> int:
    def merge_count(lo, hi):
        if hi - lo <= 1:
            return 0
        mid = (lo + hi) // 2
        cnt = merge_count(lo, mid) + merge_count(mid, hi)
        merged = []
        i, j = lo, mid
        while i < mid and j < hi:
            if arr[i] <= arr[j]:
                merged.append(arr[i])
                i += 1
            else:
                merged.append(arr[j])
                cnt += mid - i
                j += 1
        merged.extend(arr[i:mid])
        merged.extend(arr[j:hi])
        arr[lo:hi] = merged
        return cnt
    return merge_count(0, len(arr))

Time: O(n log n)
Space: O(n)

CodeSignal Pass Strategy

1) MCQ ≤ 8 minutes total

3 MCQs should take ≤ 8 minutes. Wrong MCQs cost ~5%; coding 2 unfinished costs ~30%. Save time for coding.

2) Open every coding problem with a comment block

CodeSignal scoring scans the file. Add 3 lines (input / output / complexity) before each function—forces clarity and helps grading.

3) Coding 2 brute force ≥ 60%

If you run out of time on coding 2, submit the brute force (n³). CodeSignal scores by passed cases. Empty submission = 0; brute force = 50%.

FAQ

What's TikTok's OA pass rate?

Roughly 18-25%, slightly lower than Meta/Google campus OAs. Candidates who AC both coding problems pass at 80%+; finishing only one almost always fails.

Can I skip around on CodeSignal?

Yes, but go in order: MCQ → Coding 1 → Coding 2. MCQs are quick wins; coding difficulty escalates.

Does TikTok rotate the question bank?

Yes. TikTok is one of CodeSignal's most-rotated companies—parameter shifts (array sizes, rating ranges) every month. The two coding problems above appeared in 60%+ of Q1-Q2 2026 reports.

Will Python TLE?

Coding 1 (heap + greedy)? No. Coding 2 with O(n log n)? No. Don't use O(n³) on Coding 2—CodeSignal sometimes hits n=10000, where Python TLEs.

What's the post-OA path?

OA → HR Phone Screen → 2 tech VO rounds (incl. behavioral) → 1 Bar Raiser. OA-to-onsite cycle: 3-5 weeks.


Preparing for the TikTok OA?

oavoservice covers TikTok / ByteDance CodeSignal OAs end-to-end: MCQ banks, real-time Hard Coding assistance, behavioral story polishing. We have full breakdowns of TikTok's SWE / Backend / Algo Engineer OA streams and tailor practice to your target track.

Add WeChat Coding0201 to book TikTok OA coaching.

#TikTok #TikTokOA #ByteDance #CodeSignal #MCQ #OARealQuestions


Contact

Email: [email protected]
Telegram: @OAVOProxy