TikTok Interview Questions
Curated from verified interview reports: Coding and OA rounds spanning trees, scheduling/interval problems, string routing, and greedy allocation.
9 real interview questions reported from TikTok Software Engineer interviews (Coding, OA rounds): 1 easy, 6 medium, 2 hard. Each question shows its interview round and how often it was reported, and coding questions come with runnable tests.
TikTok Coding round questions (7)
- Character String Adder - Easy, free preview
Parse the signs, compare magnitudes, then reuse grade-school addition and subtraction on digit strings. - Dual Extremes Queue - Hard, free preview
A queue with O(1) min and max queries falls out naturally from two stacks that each track their running extremes. - Lowest Common Ancestor from Serialized Tree - Medium
First rebuild the binary tree from preorder tokens, then run one DFS that counts how many target values each subtree contains. - Minimum Conference Rooms Needed - Medium
Sort the starts and ends separately, then sweep from earliest to latest to track how many rooms are simultaneously in use. - Path Prefix Router - Medium
Store routes by path segment so lookups can walk the trie and remember the deepest node that owns an origin. - Pattern First Occurrence - Medium
With only the * wildcard, the cleanest approach is to treat the pattern as ordered literal segments that must appear in sequence. - Spread Avoidance Escape - Hard
Precompute when contamination reaches every cell, then binary-search how long you can safely wait before starting.
TikTok OA round questions (2)
- Minimum Score Suppressor - Medium
The answer is monotonic: if a suppression amount x works within k operations, any larger x works too. - Optimal Voucher Allocation - Medium
Always spend the next coupon on the current largest fee, which makes a max-heap the natural data structure.