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
Easy
Software Engineer

Find first and last index of target

You are given an integer array nums sorted in non-decreasing order and an integer target. Return a pair [left, right] where: - left is the index of th...

Coding & Algorithms
7
0
63 people solved
Oct 19, 2025
TikTok logo
TikTok
Hard
Data Engineer

Count islands using BFS without modifying grid

You are given an m x n binary grid grid where: - 1 represents land - 0 represents water - Islands are groups of horizontally or vertically adjacent la...

Coding & Algorithms
6
0
74 people solved
Oct 19, 2025
TikTok logo
TikTok
Medium
Data Scientist

Count buggy vs non-buggy by employer

Count buggy vs non-buggy submissions for each employer_id, including employers with zero submissions. Return employer_id, buggy_count, non_buggy_count...

Data Manipulation (SQL/Python)
1
0
9 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Maximize products bought under budget

Given N products and M customers, for each customer find the list of distinct products they can buy without exceeding their budget such that the numbe...

Coding & Algorithms
3
0
44 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Write SQL for 7-day geo-localized revenue dashboard

Write a single SQL query (assume PostgreSQL; tz_offset is an integer hour offset from UTC) to compute a 7-day dashboard by local user date for US vs A...

Data Manipulation (SQL/Python)
0
0
9 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Compute and rank top bad advertisers

SQL on ad safety. Assume the following schema and sample rows. Use ANSI SQL. Today is 2025-09-01; interpret “last 7 days” as 2025-08-26 00:00:00 to 20...

Data Manipulation (SQL/Python)
2
0
10 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Write SQL for geo posting-frequency drops

Using the schema below, write a single ANSI SQL query (window functions allowed) that identifies countries with the largest share of creators whose po...

Data Manipulation (SQL/Python)
11
0
89 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Compute last-to-previous ad impression gaps

Given impressions(ad_id INT, user_id INT, impression_ts TIMESTAMP) with multiple impressions per (user_id, ad_id), write a single SQL query to return,...

Data Manipulation (SQL/Python)
0
0
3 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Compute CTR drop with exclusions

Assume today = 2025-09-01. Using ad delivery logs, find advertisers whose CTR in the last 7 days (2025-08-25 to 2025-08-31) dropped by at least 20% re...

Data Manipulation (SQL/Python)
8
0
110 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Compare SQL counts, windows, and NULL semantics

You’re given two tables. users(id INT, country STRING, created_at DATE) rows: 1 | US | 2025-08-28 2 | US | 2025-08-30 3 | IN | 2025-08-29 4 | BR | 202...

Data Manipulation (SQL/Python)
8
0
71 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Compute 7-day rolling complaint/order ratio in SQL

SQL only. Given the schema and sample data below, write a single Postgres query (no procedural code) to compute a 7-day rolling complaint-to-order rat...

Data Manipulation (SQL/Python)
1
0
13 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Write SQL for last-7-day metrics without windows

Assume today is 2025-09-01. Use ANSI SQL only and do not use window functions. You may use subqueries, GROUP BY, HAVING, and JOINs. Schema and small s...

Data Manipulation (SQL/Python)
0
0
9 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Machine Learning Engineer

Find longest substring without repeating characters

Problem Given a string s, find the length of the longest contiguous substring that contains no repeated characters. Input - A string s (may contain le...

Coding & Algorithms
2
0
38 people solved
Sep 29, 2025
TikTok logo
TikTok
Medium
Machine Learning Engineer

Compute longest increasing subsequence

Longest Increasing Subsequence: length, reconstruction, and counting Given an integer array nums, do all of the following: 1. Length. Compute the leng...

Coding & Algorithms
3
0
39 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Find >n/3 elements in sorted array

Question Given a sorted (non-decreasing) integer array A of length n, return all distinct values that occur strictly more than n/3 times. Design an al...

Coding & Algorithms
4
0
29 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Solve grid min path and sqrt by binary search

1) Given an m x n matrix of non-negative integers, find a path from the top-left to the bottom-right that minimizes the sum of cell values. You may on...

Coding & Algorithms
4
0
49 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Count islands on a torus grid

You are given an m x n binary grid representing water ( 0) and land ( 1) laid out on a torus: the top edge is adjacent to the bottom edge and the left...

Coding & Algorithms
3
0
22 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Find substring where all chars appear at least k

You are given a string s and an integer k (1 ≤ k ≤ |s|). Return the length of the longest substring in which every distinct character occurs at least ...

Coding & Algorithms
3
0
43 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Debug a Hive query

You are given a prewritten Hive SQL query that produces incorrect results. Describe how you would debug it: identify logical errors (e.g., join condit...

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

Design LRU cache with O(1) operations

Design and implement an in-memory cache that evicts the least recently used entry when capacity is reached. Support get(key) and put(key, value) in O(...

Coding & Algorithms
2
0
27 people solved
Sep 6, 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