TikTok Coding & Algorithms Interview Questions

Preparing for TikTok Coding & Algorithms interview questions means expecting a fast-paced, implementation-heavy process that blends timed online assessments and live pair-programming. What’s distinctive is the combination of algorithmic depth and production-minded expectations: interviewers look for correct and efficient algorithms, clean and idiomatic code, clear complexity analysis, robust handling of edge cases and tests, and the ability to explain tradeoffs concisely. For front-end or platform-adjacent roles you may also face language- or framework-specific problems (for example JavaScript/React), while senior roles commonly add system-design flavor to the evaluation. In practice you should expect an initial online assessment (multiple problems on a coding platform) followed by 45–60 minute technical screens that mix 1–2 LeetCode-style problems with resume questions. Good interview preparation focuses on timed problem practice (arrays, strings, trees, graphs, dynamic programming, hashing, two-pointers), writing and running code in a shared editor, narrating your thought process, and practicing clean test cases. Do mock interviews, review core library functions in your primary language, and rehearse concise explanations of complexity and tradeoffs—these habits improve speed, correctness, and the communication TikTok typically evaluates.

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

Find linked user records by weighted similarity

This question evaluates skills in similarity-based record linkage, weighted field scoring, and graph connectivity analysis within the Coding & Algorit...

Coding & Algorithms
7
0
59 people solved
Jan 6, 2026
TikTok logo
TikTok
Medium
Software Engineer Locked

Verify business accounts with progressive KYC rules

This question evaluates skills in string parsing, text normalization, rule-based validation, and token-based string matching within a KYC verification...

Coding & Algorithms
9
0
70 people solved
Jan 6, 2026
TikTok logo
TikTok
Medium
Software Engineer

Solve three algorithm tasks

Solve the following algorithm tasks and explain your approach, time complexity, and space complexity for each: 1) Fully justify text: Given an array o...

Coding & Algorithms
3
0
53 people solved
Aug 13, 2025
TikTok logo
TikTok
Medium
Software Engineer

Solve Topological Sort and Anagram Indices

1) Given a directed graph (n vertices, m edges), return a topological ordering if one exists. If the graph contains a cycle, detect it and explain how...

Coding & Algorithms
3
0
51 people solved
Aug 11, 2025
TikTok logo
TikTok
Medium
Software Engineer

Reverse nodes in even-length linked-list groups

Problem Given the head of a singly linked list, you will traverse the list in contiguous groups of increasing size: the 1st group has size 1, the 2nd ...

Coding & Algorithms
5
0
74 people solved
Dec 11, 2025
TikTok logo
TikTok
Medium
Software Engineer

Compute length of longest increasing subsequence

You are given an integer array nums of length n. A subsequence of nums is a sequence that can be derived from nums by deleting zero or more elements w...

Coding & Algorithms
7
0
69 people solved
Dec 10, 2025
TikTok logo
TikTok
Hard
Machine Learning Engineer

Generate all safe queen placements on board

You are given an integer n representing the size of a chessboard (n × n). You need to place n queens on the board so that no two queens attack each ot...

Coding & Algorithms
4
0
42 people solved
Dec 8, 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
48 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
32 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Implement O(1) randomized multiset

Implement O(1) randomized multiset Write code for a data structure that supports add(x), remove(x), and getRandom() in average O( 1) time where duplic...

Coding & Algorithms
2
0
40 people solved
Jul 17, 2025
TikTok logo
TikTok
Medium
Data Scientist

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, ...

Coding & Algorithms
4
0
62 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

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...

Coding & Algorithms
4
0
46 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Machine Learning Engineer Locked

Compute minimum path sum in a triangle

This question evaluates proficiency in dynamic programming and algorithmic problem-solving within the Coding & Algorithms domain, focusing on handling...

Coding & Algorithms
4
0
45 people solved
Jan 22, 2026
TikTok logo
TikTok
Hard
Software Engineer Locked

Find k-th smallest subarray sum

This question evaluates algorithmic problem-solving skills in array processing, specifically understanding of subarray sum properties, selection and r...

Coding & Algorithms
7
0
56 people solved
Jan 22, 2026
TikTok logo
TikTok
Medium
Software Engineer Locked

Find longest common subsequence length

This question evaluates understanding of dynamic programming and sequence comparison algorithms by asking for the length of the longest common subsequ...

Coding & Algorithms
4
0
39 people solved
Jan 22, 2026
TikTok logo
TikTok
Medium
Software Engineer Locked

Solve two grid problems (islands + min-cost path)

This pair of problems evaluates grid-based algorithm competencies, specifically connected-component detection and translation-invariant shape recognit...

Coding & Algorithms
11
0
105 people solved
Jan 22, 2026
TikTok logo
TikTok
Easy
Data Scientist

Maximize watched duration under consecutive-sum limit

You have a list of videos in a feed. Video i has duration d[i] (positive integer). A user has an “attention span” limit A. You want to select a subset...

Coding & Algorithms
7
0
64 people solved
Jan 17, 2026
TikTok logo
TikTok
Medium
Software Engineer

Find top-k rated nodes via traversal

You are given a finite graph (directed or undirected) with n nodes and m edges. Each node u has an integer rating r[u]. Given a starting node s and an...

Coding & Algorithms
7
0
56 people solved
Sep 6, 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
41 people solved
Sep 6, 2025
TikTok logo
TikTok
Hard
Software Engineer Locked

Find longest substring with ≥k repeats

This question evaluates proficiency with string-processing techniques and character frequency analysis, focusing on algorithmic skills in the Coding &...

Coding & Algorithms
3
0
38 people solved
Jan 9, 2026

Frequently Asked Questions

How difficult are TikTok Coding & Algorithms interview questions?
TikTok Coding & Algorithms interviews are typically in the medium-to-hard range, with variation by team and seniority. Many candidates report a majority of medium problems and a significant portion of hard problems for senior roles; entry-level roles skew easier but still require solid algorithmic fluency. Interviewers evaluate correctness, complexity reasoning, and the ability to iterate toward an optimized solution under time pressure. Expect to explain tradeoffs, defend complexity claims, and handle edge cases. Difficulty also depends on role focus: platform or recommendation teams often ask graph and large-data problems, while product-facing teams emphasize strings, arrays, and implementation details.
What is the typical interview process at TikTok and where do Coding & Algorithms questions appear?
The TikTok interview flow commonly starts with a recruiter screen and proceeds through one or two technical coding interviews, followed by system design and behavioral rounds for mid-to-senior roles. Coding & Algorithms questions appear early and often: they are central to phone screens and the technical onsite segments where live coding is used to assess problem decomposition, correctness, and optimization. For data- or ML-focused roles, algorithmic problems may be tailored to large-scale data processing and graph algorithms. Some teams use online assessments or take-home tasks before scheduling live interviews.
How should I schedule my preparation timeline for TikTok Coding & Algorithms interviews?
A practical preparation timeline is structured and incremental: spend the first two to three weeks reinforcing fundamentals—arrays, strings, linked lists, trees, hashing—and complexity analysis. The next three to four weeks focus on pattern-based practice: sliding window, two pointers, BFS/DFS, heaps, binary search, union-find, and dynamic programming, solving medium-to-hard problems under timed conditions. In the final one to two weeks, emphasize mock interviews, end-to-end solutions with clear communication, and targeted weak-point remediation. Include periodic system-design review if interviewing for senior roles and practice explaining tradeoffs concisely.
Which key subtopics should I study for TikTok Coding & Algorithms interviews?
Prioritize core data structures and algorithmic patterns that commonly surface in social-platform interviews: graph algorithms (BFS/DFS, shortest paths, union-find), trees, heaps, and hash-based techniques. Master arrays and strings, two-pointer and sliding-window strategies, binary search, sorting, and priority-queue use cases. Dynamic programming and recursion deserve focused practice for medium-to-hard problems. Also build intuition for time and space complexity, edge-case handling (NULLs, empty inputs, off-by-one), and practical performance considerations like in-place operations and amortized analysis. For roles tied to recommendations, practice large-data aggregation and streaming-style logic.
What standout tips and common pitfalls should I keep in mind for TikTok Coding & Algorithms interviews?
Standout tips include clarifying requirements up front, stating assumptions, and outlining a high-level approach before coding. Communicate complexity tradeoffs as you refine the solution and run through representative test cases aloud. Use iterative improvement: present a correct brute force, then optimize. Common pitfalls are diving into code without confirming constraints, ignoring edge cases, failing to test, and not communicating when stuck. Avoid premature optimization and overengineering; interviewers value clear reasoning, clean code, and the ability to adapt to hints or changing constraints. End by summarizing correctness and complexity.

Explore more TikTok Coding & Algorithms interview questions

Real questions from candidate reports, grouped by role, topic and company.

By role
Other categories at TikTok
Coding & Algorithms questions at other companies
Browse all