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.

"I got asked a hardcore MCM DP question and I saw it on PracHub as well. Solved that question in 5 minutes. Without PracHub I doubt I could solve it in 5 hours. Though somehow didn't get hired, perhaps I guess I solved it too fast? /s"

"Believe me i'm a student here jn US. Recently interviewed for MSFT. They asked me exact question from PracHub. I saw it the night before and ignored it cause why waste time on random sites. I legit wanna go back and redo this whole thing if I had chance. Not saying will work for everyone but there is certainly some merit to that website. And i'm gonna use it in future prep from now on like lc tagged"

"10 years of experience but never worked at a top company. PracHub's senior-level questions helped me break into FAANG at 35. Age is just a number."

"I was skeptical about the 'real questions' claim, so I put it to the test. I searched for the exact question I got grilled on at my last Meta onsite... and it was right there. Word for word."

"Got a Google recruiter call on Monday, interview on Friday. Crammed PracHub for 4 days. Passed every round. This platform is a miracle worker."

"I've used LC, Glassdoor, and random Discords. Nothing comes close to the accuracy here. The questions are actually current — that's what got me. Felt like I had a cheat sheet during the interview."

"The solution quality is insane. It covers approach, edge cases, time complexity, follow-ups. Nothing else comes close."

"Legit the only resource you need. TC went from 180k -> 350k. Just memorize the top 50 for your target company and you're golden."

"PracHub Premium for one month cost me the price of two coffees a week. It landed me a $280K+ starting offer."

"Literally just signed a $600k offer. I only had 2 weeks to prep, so I focused entirely on the company-tagged lists here. If you're targeting L5+, don't overthink it."

"Coaches and bootcamp prep courses cost around $200-300 but PracHub Premium is actually less than a Netflix subscription. And it landed me a $178K offer."

"I honestly don't know how you guys gather so many real interview questions. It's almost scary. I walked into my Amazon loop and recognized 3 out of 4 problems from your database."

"Discovered PracHub 10 days before my interview. By day 5, I stopped being nervous. By interview day, I was actually excited to show what I knew."

"I recently cleared Uber interviews (strong hire in the design round) and all the questions were present in prachub."
"The search is what sold me. I typed in a really niche DP problem I got asked last year and it actually came up, full breakdown and everything. These guys are clearly updating it constantly."
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...
Implement streaming SRM detector with late events
Implement a streaming detector for sample ratio mismatch (SRM) across many concurrent experiments. Input is two topic-partitioned streams: assignments...
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...
Compute cluster-aware significance and sequential corrections
Cluster-Randomized Tipping UI Experiment: Power, Sequential Testing, and Multiplicity Context: A creator-level (cluster) randomized experiment evaluat...
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...
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...
Calculate valid daily usage with gap constraints
Write Standard SQL to compute, for a given date (use 2025-09-01), each user's total valid usage minutes. Schema and rules: Schema (timestamps are UTC)...
Analyze DFS, BFS, and A* trade-offs
Given a weighted graph with nodes {S,A,B,C,D,G} and edges: S–A(2), S–B(5), A–C(2), B–C(1), C–D(2), D–G(1), B–G(20). Heuristic for A*: h(A)=4, h(B)=3, ...
Implement K-means and run two iterations
Given points P={(0,0),(0,2),(2,0),(2,2),(8,8),(8,10),(10,8),(10,10)} and k=2, (1) initialize centroids with k-means++ using seed=42 and Euclidean dist...
Contrast LSTM and Transformer for long sequences
Train a Long-Context Autoregressive LM (T = 8192, H = 512, B = 8) You are training an autoregressive language model with: - Sequence length T = 8192 t...
Compare bagging vs boosting on imbalanced data
Fraud Detection on 10M Time-Ordered Transactions (0.5% Fraud) You are building a binary classifier to detect 0.5% fraudulent events among 10,000,000 t...
Use DiD for staggered treatment adoption
Staggered DiD for a Weekly RPU Rollout (50 Regions, 2025-06-01 to 2025-08-15) Context and assumptions: - You have panel data at the region-week level ...
Plan DS approach for biker delivery project
You are a Data Scientist supporting a “biker” (delivery rider) product/project for a food-delivery platform. An interviewer gives only a short descrip...
Find start indices of anagram substrings
You are given two strings: - s: the text string - p: the pattern string Return a list of all starting indices i such that the substring s[i : i + len(...
Design an experiment for exploratory recommendations
Context You are launching an online A/B test for a new version of a recommendation algorithm. The goal of the new algorithm is to increase users’ expl...
Measure Billboard Campaign Effectiveness and Engagement Quantification
Measuring Offline Billboard Campaign Effectiveness Scenario A social platform (e.g., Pinterest) runs an offline marketing campaign by placing billboar...
Explain RL policy types and modern policy gradients
Machine Learning Fundamentals (RL + Attention) Part A — Reinforcement Learning 1. Define on-policy vs off-policy learning. - What makes an algorith...
Implement distinct islands and sliding maxima
1) Given a binary grid where 1 represents land and 0 represents water, count how many distinct island shapes exist. Two islands are considered the sam...
Find second-minimal word segmentation count
Given a string s and a dictionary D of non-empty words, define a 'segmentation' as splitting s into a sequence of words from D whose concatenation equ...
Match payments to invoices with fallback rules
You are given two datasets: - invoices: each invoice has invoice_id, date, amount - payments: each payment has payment_id, optional invoice_id (may be...