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

Resolve user roles across account hierarchy

This question evaluates understanding of hierarchical data structures, role-based access control semantics, and set/map operations for computing effec...

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

Calculate transaction fees from CSV records

This question evaluates parsing and processing of structured transaction data, implementing multi-dimension fee computation rules (provider-, transact...

Coding & Algorithms
13
1
98 people solved
Jan 6, 2026
TikTok logo
TikTok
Medium
Software Engineer Locked

Compute balances, rejections, and platform reserve

This question evaluates transactional state management, time-ordered stream processing, balance reconciliation, handling of rejected transactions, and...

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

Solve linked list, string filtering, and puzzle

This multi-part question evaluates proficiency with linked-list pointer manipulation and constant-space linear-time algorithms, pattern-driven string ...

Coding & Algorithms
6
0
42 people solved
Jan 6, 2026
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
38 people solved
Aug 8, 2025
TikTok logo
TikTok
Medium
Software Engineer

Solve top-K and string rotation match

Solve top-K and string rotation match 1) Given an unsorted array of integers and an integer k, return the k largest elements in descending order. Impl...

Coding & Algorithms
2
0
41 people solved
Jul 26, 2025
TikTok logo
TikTok
Medium
Machine Learning Engineer

Determine if a string can be segmented

Given a string s and a list of strings wordDict, determine whether s can be segmented into a sequence of one or more dictionary words. - You may reuse...

Coding & Algorithms
4
0
51 people solved
Dec 15, 2025
TikTok logo
TikTok
Medium
Data Scientist

Optimize Station Sequence for Maximum Car Output in Simulation

Scenario The Car-Building mini-game lets you sequence chassis, engine, and paint stations with limited buffers. Question Describe a strategy to maximi...

Coding & Algorithms
10
0
34 people solved
Jul 12, 2025
TikTok logo
TikTok
Medium
Software Engineer

Find k-th largest element in array

You are given an unsorted array of integers nums and a positive integer k. Design an efficient algorithm to find the k-th largest element in the array...

Coding & Algorithms
5
0
44 people solved
Oct 27, 2025
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
64 people solved
Oct 19, 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
45 people solved
Oct 13, 2025
TikTok logo
TikTok
Easy
Software Engineer

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

Coding & Algorithms
3
0
45 people solved
Oct 7, 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
44 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Implement binary tree in-order traversal

Given the root of a binary tree, return the in-order ordering of its node values. Implement both a recursive solution and an iterative solution using ...

Coding & Algorithms
5
0
40 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Machine Learning Engineer

Determine frog reachability across stones

You are given a sorted array of distinct integers stones representing stone positions in a river, where stones[0] = 0. A frog starts on stone 0; its f...

Coding & Algorithms
3
0
28 people solved
Sep 6, 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
26 people solved
Aug 8, 2025
TikTok logo
TikTok
Medium
Machine Learning Engineer

Find second-minimal word segmentation count

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

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

Count subarrays summing to target

Question LeetCode 560. Subarray Sum Equals K – Given an integer array nums and an integer k, return the total number of continuous subarrays whose sum...

Coding & Algorithms
10
0
10 people solved
Aug 4, 2025
TikTok logo
TikTok
Medium
Software Engineer

Flatten object & Promise.all

Question Given a nested JavaScript object, write a function to flatten it so that nested keys are converted to a single-level path (e.g., {a:{b:1}} ->...

Coding & Algorithms
16
0
56 people solved
Jul 29, 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
22 people solved
Jul 29, 2025

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