ByteDance Interview Questions (2026-2027)
70 questions · 112 experiences · 1 discussions · LeetCode (159) · 1p3a (23) · Reddit (1)
Browse by role
Top topics
Recent community discussions
183 entries
1/8TikTok CodeSignal OA March High-Frequency Questions Summary
2025 ByteDance Data Engineer Online Test: String and Array Challenges
ByteDance TikTok 2026 Internship Online Test Experience and Solutions
ByteDance Summer Internship First Coding Interview Experience
TikTok OA: Views and Duration
Tiktok Singapore - Senior Frontend - R1
TikTok | OA | Maximise profit from strategy
TikTok | OA | Rearrange Students
TikTok | OA | 11/03/2024
TikTok OA Backend Software Engineer 2024
TikTok | iOS 2-2 | Singapore | May 2024 [Offer]
Tiktok Phone interview - MLE
TikTok Frontend Interview - rejected
TikTok OA Very Hard SDE Longest Concave Subsequence
TikTok || OA question
TikTok code interview
Tiktok First Round 2-1 level
TikTok Round 1 Backend Engineer New Grad ( Rejected)
TikTok | Remote | N dices (6 sides of char) and dictionary of M words
TikTok | Round 1 | Backend Engineer
Tiktok OA - Good subset of a Binary Matrix [HARD]🔥🔥🔥
Tiktok | OA | Q1
Tiktok 1.23-1.27 OA 5th Problem Discussion || No Original Problem
Tiktok OA Dec.26-30 slot
TikTok | 2-2 Senior | System Design and Behavioral
TikTok CodeSignal OA March High-Frequency Questions Summary
Question Details
You can find the interview experience and timeline here: <a href="https://reurl.cc/8e2rZR1
Problem: Given a memory array consisting of 0s and 1s (0 = free, 1 = occupied). Memory is aligned by 8. Support an operation alloc x: find the leftmost contiguous block of x free units whose starting index is divisible by 8, allocate it (mark as occupied and assign a unique ID).
Return the starting index, or -1 if not found.
Approach: Simulate a memory management system. * Maintain an array of the same length to record the ID assigned to each position (0 means free). * For alloc x: iterate over valid starting indices (multiples of 8), check if the next x positions are all free. If yes, assign the current ID and increment the counter. * For erase ID: scan the entire array, reset all positions with that ID to 0, and return the number of cleared units. --- ### Q2
Problem: Given an integer array, count the number of contiguous subarrays that form a sawtooth sequence (adjacent elements have alternating parity).
Approach: Count all subarrays where adjacent elements alternate between even and odd. * A single element is also considered a valid sawtooth sequence. * Traverse the array and maintain the current length cur of alternating sequence. * If current and previous elements have different parity → cur++; otherwise reset cur = 1. * Add cur to the result at each step, since it represents the number of valid subarrays ending at the current index. --- ### Q3
Problem: Starting from position 0, repeatedly walk to the nearest charging station ahead, then use a drone to carry the cargo as far forward as possible. Continue until reaching the target. Compute the total distance you actually carry the cargo on foot.
Approach: Greedy simulation. * You can use stations p[i], where from p[i] the drone can move the cargo to p[i] + 10. * The goal is to count only the walking distance (excluding drone-traveled parts). * Sort the stations first. * Each round: find the next usable station ahead of your current position, add the walking distance to reach it, then update current position to station + 10. * Repeat until reaching or passing the target. --- ### Q4
Problem: Given multiple paragraphs, their alignment (LEFT or RIGHT), and a maximum line width, format the text like a newspaper: pack words greedily into lines, pad spaces according to alignment, and add a border of * around the entire output.
Approach: Simulate text formatting. * For each paragraph, use two pointers to pack as many words as possible into each line without exceeding width. * Build lines incrementally. * When outputting: * If LEFT → pad trailing spaces * If RIGHT → pad leading spaces * Finally, add a border of * around all lines. ---
Topics
More from ByteDance
People also viewed