TikTok Interview Questions

TikTok Coding & Algorithms Interview Questions

Practice 291 real TikTok interview questions for 2026 — TikTok interview questions drawn from actual interviews with detailed solutions to support focused interview preparation. This collection emphasizes coding and system-design skills first (Coding & Algorithms, System Design), then moves to analytics, experimentation, SQL/Python, machine learning, and behavioral topics. Expect live coding (arrays, strings, trees, DP), mid-level system-design rounds that probe scale and video-recommendation tradeoffs, product-analytics and A/B discussion, and role-specific takeaways for data and ML roles. Prep by practicing medium-to-hard coding problems, sketching scalable architectures, rehearsing STAR stories tied to impact, and building short SQL/Python notebooks that reproduce common TikTok metrics. For role-specific patterns: Software Engineer rounds repeatedly test string/DP/stack problems, nested-list parsing, tree and linked-list manipulations, and designing scalable testable APIs. Data Scientists focus on metric definition and decomposition, fraud and precision/recall tradeoffs, live-creator and Watch-Time SQL, recommendation-bias and misinformation analysis, streaming-median and path-sum style algorithmic tasks, and multimodal deployment constraints. Machine Learning Engineers see dynamic-K models, video-captioning and multimodal embedding design under compute limits, attention/KV-cache topics, and ML diagnostics. Product Managers get flow critiques, A/B test design, monetization and anti-cheat product cases.

291 Questions 1 Company03.01.2026
Showing 20 results
Role
TikTok logo
TikTok
Medium
Software Engineer

Segment a message with width-constrained suffixes

Given a message string s and an integer width W, split s into consecutive segments and append a suffix "i/n" to each segment indicating its 1-indexed ...

Coding & Algorithms
5
0
42 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Compute pipeline order from dependencies

You are given a set of pipelines and a list of directed dependency pairs (A, B) meaning pipeline A depends on pipeline B and therefore B must run befo...

Coding & Algorithms
6
0
45 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Data Engineer

Debug a Hive Query for DAU

You are given two Hive tables: users(user_id BIGINT, created_at TIMESTAMP) and events(user_id BIGINT, event_time TIMESTAMP, event_name STRING) PARTITI...

Data Manipulation (SQL/Python)
0
0
7 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Solve four algorithm design tasks

Solve the following four algorithmic tasks: 1) Implement wildcard pattern matcher: Given a text s and a pattern p where '?' matches any single charact...

Coding & Algorithms
5
0
62 people solved
Aug 13, 2025
TikTok logo
TikTok
Medium
Software Engineer

Solve array and tree algorithm challenges

Solve the following three algorithmic tasks: 1) Unique triplet sum: Given an integer array nums and an integer target (default 0), return all unique t...

Coding & Algorithms
4
0
38 people solved
Aug 13, 2025
TikTok logo
TikTok
Medium
Machine Learning Engineer

Fix a BST with two misplaced keys

Fix a BST with two misplaced keys You are given the root of a binary search tree in which exactly two nodes’ keys were accidentally swapped. Restore t...

Coding & Algorithms
3
0
25 people solved
Aug 8, 2025
TikTok logo
TikTok
Medium
Software Engineer

Implement distinct islands and sliding maxima

Implement distinct islands and sliding maxima 1) Given a binary grid where 1 represents land and 0 represents water, count how many distinct island sh...

Coding & Algorithms
2
0
36 people solved
Aug 8, 2025
TikTok logo
TikTok
Hard
Software Engineer

Explain multithreading and locks

Explain multithreading and locks Multithreading, Locks, Concurrency Hazards, and a Bounded Queue Design Context: Technical screen for a software engin...

System Design
6
0
46 people solved
Aug 8, 2025
TikTok logo
TikTok
Medium
Software Engineer

Solve message splitting and board crushing

Question LeetCode 2468. Split Message Based on Limit – Given a message string and a per-line width, split it into parts adding the suffix "<i/n>" (e.g...

Coding & Algorithms
7
0
85 people solved
Aug 4, 2025
TikTok logo
TikTok
Medium
Data Scientist

Calculate Monthly Conversion Rate and Average Order Value

page_views +-----------+---------+---------------------+ | user_id | page_id | view_timestamp | +-----------+---------+---------------------+ |...

Data Manipulation (SQL/Python)
0
0
6 people solved
Aug 4, 2025
TikTok logo
TikTok
Medium
Data Scientist

Analyze Posting Behavior by Cohort and Date

creator_post +------------+---------+------+ | post_date | user_id | post | +------------+---------+------+ | 2023-01-01 | 111 | 1 | | 2023-01...

Data Manipulation (SQL/Python)
0
0
4 people solved
Aug 4, 2025
TikTok logo
TikTok
Medium
Data Scientist

Calculate Day-7 Retention Rate from User Post Data

post_activity +---------+------------+-------+ | user_id | post_date | posts | +---------+------------+-------+ | 1 | 2023-01-01 | 3 | | 1 ...

Data Manipulation (SQL/Python)
0
0
7 people solved
Aug 4, 2025
TikTok logo
TikTok
Medium
Data Scientist

Identify Repeat Advertisers from Consecutive Weeks

SUBMISSIONS +--------------+-----------+-----------+ | advertiser_id| ad_id | week_id | +--------------+-----------+-----------+ | A123 ...

Data Manipulation (SQL/Python)
0
0
3 people solved
Aug 4, 2025
TikTok logo
TikTok
Medium
Software Engineer

Solve intervals and distinct islands

Question LeetCode 56. Merge Intervals LeetCode 694. Number of Distinct Islands https://leetcode.com/problems/merge-intervals/description/ https://leet...

Coding & Algorithms
6
0
21 people solved
Jul 29, 2025
TikTok logo
TikTok
Medium
Software Engineer

Format messages with paginated suffixes

You are given a message string s and an integer width w. Split s into multiple chunks, preserving character order, and append a suffix "i/n" to each c...

Coding & Algorithms
5
0
39 people solved
Jul 29, 2025
TikTok logo
TikTok
Medium
Software Engineer

Implement a match-3 board resolver

Question Implement a match-3 board resolver (the core loop of a "candy crush"-style game). You are given an m×n grid of cells. Each cell holds a value...

Coding & Algorithms
3
0
41 people solved
Jul 29, 2025
TikTok logo
TikTok
Medium
Software Engineer

Explain Java DI, AOP, and transactions

Explain how dependency injection and AOP proxies are implemented in a modern Java framework such as Spring: bean lifecycle (creation, post-processing,...

Coding & Algorithms
2
0
18 people solved
Jul 17, 2025
TikTok logo
TikTok
Medium
Software Engineer

Parse chemical formula with multipliers

Parse chemical formula with multipliers Given a string representing a chemical formula, parse it and return the total count of each element. The formu...

Coding & Algorithms
3
0
34 people solved
Jul 16, 2025
TikTok logo
TikTok
Medium
Software Engineer

Write complex SQL for cohorts and retention

Given tables users(uid, created_at, country), orders(order_id, uid, amount, created_at, status), and events(uid, ts, event_type, campaign), write one ...

Data Manipulation (SQL/Python)
0
0
9 people solved
Jul 15, 2025
TikTok logo
TikTok
Medium
Data Engineer

Debug a Hive insert query

Given a Hive table schema and an incoming table plus an INSERT/SELECT statement meant to inject data, identify why the query fails and provide step-by...

Data Manipulation (SQL/Python)
0
0
5 people solved
Jul 15, 2025

Frequently Asked Questions

How difficult are TikTok interview questions across roles and levels?
TikTok interview questions are generally medium-to-hard and scale with role and seniority. Entry-level software and data roles usually see medium LeetCode-style problems plus basic systems or SQL checks, while mid and senior candidates face harder algorithmic problems, system design conversations that focus on video delivery and recommendation tradeoffs, and deeper product-metric reasoning. Data scientist interviews combine SQL, statistics, and real-world metric design; machine learning roles probe attention, deployment, and model-scaling constraints. Timed online assessments and hiring-committee reviews raise the bar for correctness, clarity, and tradeoff justification, so expect pressure to code accurately and explain decisions cleanly.
What is the typical TikTok interview process and which roles see which question categories?
The typical process starts with a recruiter screen, usually followed by an online assessment for technical roles, then one or more live technical interviews, and a final hiring-committee review. Software engineers encounter coding and, for mid/senior levels, system design focusing on video infrastructure and global latency. Data scientists face SQL, product-metric design, experimentation, and fraud or trust-and-safety scenarios. Machine learning engineers see modelling, attention/FlashAttention concepts, and deployment constraints. Product managers get product cases, A/B test design, and privacy tradeoffs. Behavioral and leadership questions appear in all tracks to assess ownership and cross-functional collaboration.
How long should I prepare for a TikTok interview and how should I structure my timeline?
Most candidates benefit from a 6-to-8-week focused plan that balances algorithm practice, system and product study, and role-specific work. Start with foundational algorithms and timed coding practice in weeks one to three, add system design and architecture rehearsals in weeks three to five if you are applying for mid/senior engineering, and dedicate parallel time to role-specific skills: SQL and experimentation for data scientists, attention and deployment constraints for ML engineers, and product-case frameworks for PMs. In the final two weeks, emphasize mock interviews, clean-up of portfolio or take-home projects, and behavioral storytelling using concrete impact examples.
What are the key subtopics I should master for TikTok interviews by role?
For Data Scientist roles, focus on metric definition and decomposition, fraud detection tradeoffs of precision versus recall, SQL window functions and streaming/real-time analytics, and A/B test design and diagnostics. Software Engineers should master strings, dynamic programming, stacks, parsing nested structures, common tree and linked-list manipulations, and scalable system choices for video and recommendation services. Machine Learning Engineers must know attention mechanisms, memory/kv cache patterns, RoPE/positional encodings, multimodal embedding training under compute limits, and overfitting diagnostics. Product Managers should be fluent in product strategy, experiment design, retention mechanics, and privacy implications.
What standout tips and common pitfalls should I remember when preparing for TikTok interviews?
Prioritize clear problem restatement, concrete examples, and early test cases when coding; interviewers value incremental, correct solutions over clever but opaque shortcuts. Quantify product impact when discussing metrics and choose evaluation criteria that match business goals rather than technical purity. For ML roles, emphasize validation strategy and production constraints like latency and memory. Avoid common pitfalls: ignoring edge cases, skipping complexity analysis, overengineering systems without operational considerations, and treating behavioral answers as rehearsed scripts instead of specific, outcome-focused stories demonstrating ownership and collaboration.

Explore more TikTok interview questions

Jump straight to TikTok questions for a specific role or category.

By role
By category
In-depth guides
Across all companies