ByteDance · Software Engineer
Updated · 2026-09-24

ByteDance Software Engineer
Interview Guide

THE 60-SECOND BRIEF

ByteDance's consumer applications include TikTok, CapCut and Lark. The Software Engineer role covered here works on the backend, infrastructure and client systems behind them: microservices, data pipelines, distributed storage, media streaming, ad serving, recommendation infrastructure, trust and safety platforms and client-side rendering frameworks. The reported interview questions follow from that work. They cover caches, rate limiters, versioned stores, concurrency under heavy traffic, and the networking and database internals those systems depend on.

This guide covers the five stages candidates report for the ByteDance Software Engineer role and the four question categories they describe: algorithms and data structures, system design, CS fundamentals, and deep dives into your résumé. The research notes set expectations by level. New grads need strong fundamentals and algorithm practice. Mid-level candidates need end-to-end ownership of production services. Senior and staff candidates need cross-team architecture and reliability work. The notes also say mid-level and senior candidates face both high-level and low-level design, so weight your design practice by the level you are interviewing for.

ByteDance candidates report 5 rounds · ≈ 4-6 weeks. The stages below are what candidates describe, not a published process.

Enforce blocks and deletions on the read pathBound thread reads with denormalized roots or pathsShard hot counters and absorb celebrity read fanout

46 min read

Practice 16 Software Engineer prompts
112Company bank questionsSnapshot · Sep 24, 2026 PT
34Candidate experiences ↗Read their reports
16Practice promptsAcross five skill areas
3With worked solutionsIncluded in the practice prompts

ByteDance's consumer applications include TikTok, CapCut and Lark. This guide's research notes describe the Software Engineer role as work on the systems behind those products, across problem spaces such as microservices, data pipelines, distributed storage, real-time media streaming, ad serving, recommendation infrastructure, trust and safety platforms and machine-learning deployment. The notes mention both backend and frontend services, and work that can range from distributed graph analytics engines to optimising client-side rendering frameworks. What you work on depends on the organisation you join. The notes give Core TikTok Backend, Monetization & Commerce Ads, Infrastructure & Cloud, and Trust & Safety as examples.

The reported questions fall into four groups. Algorithms and data structures: reversing a linked list in groups of k, LRU and LFU caches with O(1) operations, and grid searches that carry extra state. System design: a distributed key-value cache with strictly increasing versions, an auction platform that must prevent bidding races, a global API rate limiter, real-time top-k trending posts, and an RBAC schema. CS fundamentals: what happens when you enter a URL, TCP versus UDP, MySQL clustered and secondary indexes, Redis sorted sets, and thread synchronisation. The fourth group is detailed questioning of your own past projects. The PracHub bank for this role has more questions of the same kinds, including interval merging, course-schedule feasibility, an expiring LRU cache, a distributed rate limiter and a content moderation pipeline.

Candidates describe five stages over roughly four to six weeks. First comes a recruiter screen. Next is an online assessment, which some candidates skip and go straight to a technical phone interview. After the phone interview comes an onsite or virtual loop of three technical rounds, and last a final conversation with a hiring manager or HR partner. The notes say you must pass each technical stage before the next one is scheduled, and that interviewers keep asking follow-ups until they reach the limit of what you know. For every topic, prepare one level deeper than your first answer.

01

Recruiter Screen

reported

The research notes describe this as a screening call to check your fit for the role. Use it to learn what you need for preparation: which organisation or team the role sits in, whether you will take the online assessment or go straight to the phone interview, which languages the coding rounds accept, and whether system design is in scope at your level. Raise hard constraints here, such as start date, location, work authorisation or a competing deadline. That costs far less now than after several interviewers have spent time on you.

What to demonstrate

  • Whether your background and level match the role you applied for
  • Whether your constraints on location, start date, work authorisation and competing timelines fit the process
  • How clearly you summarise your recent work, which sets up the résumé questions in later rounds

How to prepare

  • Write your questions for the recruiter: team or organisation, whether the online assessment applies to you, allowed languages, and whether design is in scope at your level
  • Write each constraint down as a one-line fact before the call so you state it rather than negotiate it live
  • Prepare a short summary of your most complex recent project, and only pick one you can defend in detail later
PracHub interview research
02

Online Assessment

reported

Candidates report that some take an online assessment and others go straight to a technical phone interview. The research notes do not describe the assessment's format, so prepare for the reported coding questions, whichever stage they appear in: linked-list manipulation such as reversing in groups of k, cache structures with O(1) operations, and grid searches whose state is more than the cell. Get a correct brute force passing first, then improve it without deleting the working version.

What to demonstrate

  • Whether your code runs and returns correct output on inputs you were not shown
  • Whether you handle degenerate inputs: an empty list, k larger than the list, a single-cell grid, an unreachable target
  • Whether the complexity of your submission fits what the input constraints require

How to prepare

  • From a blank file in your interview language, implement k-group reversal and an LRU cache. Test each on empty input, one element and a final group shorter than k
  • Practise grid searches where the state includes more than position, such as (row, column, fuel remaining), until choosing the state comes without thinking
  • Add a fixed check before every submission: loop bounds, null handling and integer overflow
PracHub interview research
03

Technical Phone Interview

reported

The research notes describe this interview as coding plus theory questions, and they list rapid-fire CS fundamentals among what technical screeners ask. Topics include what happens when a URL is entered, TCP versus UDP with congestion and flow control, MySQL clustered versus secondary indexes, B+ trees versus hash indexes, Redis sorted sets and persistence, and thread synchronisation and deadlock. The notes call over-investing in algorithm practice while neglecting fundamentals a common preparation mistake. For coding questions in general, the notes say to expect follow-ups asking you to cut time or space, or to adapt the code for concurrent use, so have an answer ready for both.

What to demonstrate

  • Whether you explain networking, database and OS mechanisms accurately and in order, not as a list of keywords
  • Whether you write working code and can trace it by hand on a sample input
  • Whether you can adapt a solution when asked to optimise it or make it safe under concurrent access

How to prepare

  • Write a one-paragraph answer to each reported theory question. Then have someone ask 'why?' twice after each one and note where you run out
  • Rehearse the URL-to-page walk end to end: DNS resolution, TCP handshake, TLS negotiation, HTTP request and response, and where each step can fail
  • For one structure you have already coded, such as an LRU cache, explain how you would make it thread-safe and what a single global lock costs
PracHub interview research
04

Onsite/Virtual Loop

reported

The notes describe three technical rounds followed by a final round with a hiring manager or HR partner. They do not say which technical round covers which topic, so prepare all four categories the reported questions fall into: coding, system design, CS fundamentals and your past projects. Reported design questions include a distributed key-value cache with timestamped keys and strictly increasing versions, an auction platform that must prevent race conditions under heavy bidding, a global API rate limiter, real-time top-k trending posts over sliding windows, and an RBAC schema. The notes say mid-level and senior candidates face both high-level and low-level design.

What to demonstrate

  • Whether you lead a design yourself: clarify scale, choose storage, and cover failure modes and consistency without being prompted
  • Whether you handle concurrency concretely, for example how two bids on one item are serialised or how versions stay strictly increasing
  • Whether your coding answers run and handle edge cases
  • Whether you can defend the choices in your past projects under detailed follow-up

How to prepare

  • Work the auction and versioned-cache questions end to end. For each, name the operation that must be atomic and the mechanism that makes it so
  • Work the rate limiter with an explicit algorithm choice, such as token bucket or sliding window, and say where its state lives and what happens when that store is unreachable
  • Do this guide's cursor pagination worked exercise to practise specifying an API contract exactly
  • Prepare two project stories down to the metrics, the bottlenecks and the alternatives you rejected
PracHub interview research
05

Final Round

reported

The notes describe a final interview with a hiring manager or HR partner to judge overall fit and alignment. They also say both engineers and hiring managers question candidates' past work, so prepare the reported résumé questions for this conversation too. Those questions cover your most complex architecture and why you chose its stack, a production outage you triaged, how you tracked stability and latency SLAs, a slow service you optimised, and a disagreement you settled with metrics or benchmarks.

What to demonstrate

  • Whether you describe your own contribution specifically, and consistently with what you said in earlier rounds
  • Whether you can state the trade-offs you made under deadline and how you measured their impact
  • Whether your goals and working style fit the role and the team

How to prepare

  • Write one page per project with the numbers you will quote (traffic, latency before and after, team size, what broke) and how each was measured
  • Prepare the outage story in order: detection, triage, mitigation, root cause, and the change that stops it happening again
  • Prepare questions for the hiring manager about the team's systems and how its work is measured
PracHub interview research

34 candidate reports. Individual accounts describe a particular role and hiring cycle.

Software Engineer

ByteDance Software Engineer Interview Experience — Rejected After a TikTok Trust & Safety System Design Round on a Video Moderation Pipeline

Technical ScreenOutcome: rejected

Interviewed in June. Second round: system design interview, 1 hour. Project deep-dive (about 20 minutes). System Design — Video Content Moderation System Question: design a simplified video content moderation system. The interviewer scoped it very clearly: I didn't need to design the video upload part — assume there's already a system that pushes uploaded videos to you. What I needed to design wa…

Read full experience
Software Engineer

TikTok Intern Software Engineer Interview Experience — Agent Metrics, Tool Debugging, and Graphs

Technical Screen

The interviewer opened with, "Do you speak Chinese?" After I said yes, we spoke Chinese for the entire interview. I gave a brief introduction, then we went straight into questions. Fundamentals / business design Memory and virtual memory: Follow-up: What is virtual memory for? Follow-up: Can virtual memory space (VRAM) be larger than physical memory (RAM)? The reasoning we discussed: Yes. Virtual…

Read full experience
Software Engineer

ByteDance New Grad Software Engineer Interview Experience — Backend Fundamentals, Databases, and One DFS Problem

Technical Screen

First round: technical interview. The interviewer was based in China. The interview leaned toward backend fundamentals, databases, middleware, and web protocols, followed by one algorithm problem. Deep dive into resume projects The interviewer asked about past projects on my resume, focusing on project architecture, the reasons for technical choices, and implementation details from the business l…

Read full experience
Senior SDE, Quality Platform & AI Test Automation

ByteDance Senior+ Software Engineer Interview Experience — AI QA Workflow Design and an Unfinished Merge Intervals

Technical Screen

Good luck to everyone. I hope my bad example can help someone. Location: San Jose Role: Senior SDE, Quality Platform & AI Test Automation Interviewer: The team's QA leader; the interview was in Chinese over video with a shared whiteboard. Background: More than ten years in DevOps and engineering productivity. I have built CI/CD platforms and an AI code-review platform. How the interviewer framed…

Read full experience
Software Engineer

ByteDance Intern Software Engineer Interview Experience — Four Difficult Online Assessment Questions

Online Assessment

There were four questions in total, and they were quite difficult. Question 1 Description Given an array of positive integers numbers, calculate how many of its elements have an even number of digits. Note: The solution did not need to be optimal, but a time complexity no worse than O(numbers.length^2) would fit within the execution time limit. Example For numbers = [12, 134, 111, 1111, 10], the…

Read full experience

PracHub editorial advice for the preparation topics above.

01

Preparing only for live coding and stalling on the CS theory questions in the technical phone interview

The research notes describe the phone interview as coding plus theory, and they list CS fundamentals questions on TCP congestion and flow control, MySQL clustered versus secondary indexes, Redis sorted-set internals and deadlocks. Write a short answer to each, then practise the second 'why'. For example: a B+ tree serves range queries better than a hash index because its leaves are ordered and linked, so a range is one descent plus a scan. InnoDB handles phantom reads under Repeatable Read with MVCC snapshots for plain reads and next-key locks for locking reads. When you do not know something, say what you do know and reason from there instead of guessing.

02

Submitting LRU, LFU or k-group reversal code that breaks on the boundary cases the question itself names

The reported questions state their own traps: a final group with fewer than k nodes, and O(1) for every cache operation. For k-group reversal, confirm whether a short final group stays in its original order, then test k = 1, k equal to the list length and k larger than it. For LFU, O(1) needs three things: a key-to-node map, a frequency-to-list map, and a minimum-frequency value that resets to 1 on every insert. A heap makes eviction O(log n) and misses the requirement. Trace each solution by hand on a small input before you say you are done.

03

Designing the auction platform or versioned cache without saying which operation must be atomic

The reported design questions centre on concurrency: bidding races, strictly increasing versions, thread-safe reads and writes, and top-k over sliding windows. A diagram of a queue next to a cache does not answer them. Name the invariant, for example that a bid is accepted only if it beats the current highest, or that a key's version never goes backwards. Name the one place it is enforced, such as a conditional write, a per-key sequencer, or a partition that serialises one item's bids. Say what happens when a consumer receives a message twice. Then give the failure you designed for and its recovery path.

04

Coding a grid search before the state and the allowed moves are pinned down

On the zigzag grid question, ask whether a cell may be revisited. Two adjacent cells with different values can alternate up and down forever, so the state graph over (cell, next direction) has cycles and memoised DFS on it is not valid as stated. Settle the constraint first, for example right and down moves only, which makes the graph acyclic. On the fuel-limited grid, run Dijkstra over (row, column, fuel remaining), with a recharge station resetting fuel, for O(mnF log(mnF)). State the complexity and get the interviewer to agree before writing code.

05

Quoting résumé metrics you cannot explain when the follow-up asks how they were measured

The reported résumé questions ask how you tracked latency SLAs, which tools found a slow query, and why you chose one stack over the alternatives. The notes say interviewers keep asking follow-ups until they reach the limit of your knowledge. Before the loop, write down for every number the time window, the percentile and where the timer started. For every major choice, write down the alternative you rejected and why. A number you cannot defend does more damage than giving no number.

Choose a category, try a prompt, then open its approach, worked solution or follow-up when you need it.

13 technical prompts3 include a worked solution

Design and implement a data structure for an LRU (Least Recently Used)…

medium
data structures and algorithms

Design and implement a data structure for an LRU (Least Recently Used) cache and an LFU (Least Frequently Used) cache with $O(1)$ time complexity for basic operations.

Approach
  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Walk one small example through your approach before writing the whole thing.
  3. Name the brute-force solution and its complexity before improving on it.
Follow-up
  • Which test case would catch an off-by-one here?
  • What is the worst case, and how likely is it on real data?

Given a head pointer to a linked list, reverse the nodes in groups of …

medium
data structures and algorithms

Given a head pointer to a linked list, reverse the nodes in groups of $k$. Handle edge cases where remaining nodes are fewer than $k$.

Approach
  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Walk one small example through your approach before writing the whole thing.
  3. Choose the data structure from the access pattern, not from familiarity.
Follow-up
  • Which test case would catch an off-by-one here?
  • What is the worst case, and how likely is it on real data?

Given a 2D grid containing integers, find the longest zigzag path wher…

medium
data structures and algorithms

Given a 2D grid containing integers, find the longest zigzag path where adjacent cells alternate between strictly increasing and decreasing values.

Approach
  1. Choose the data structure from the access pattern, not from familiarity.
  2. State the target complexity and say which constraint rules the naive version out.
  3. Name the brute-force solution and its complexity before improving on it.
Follow-up
  • Which test case would catch an off-by-one here?
  • How does this change if the input no longer fits in memory?

Given an $m \times n$ grid with movement costs, obstacle cells, and re…

medium
data structures and algorithms

Given an $m \times n$ grid with movement costs, obstacle cells, and recharge stations, calculate the minimum cost to navigate from start to finish with limited fuel using a 3D graph search.

Approach
  1. State the target complexity and say which constraint rules the naive version out.
  2. Walk one small example through your approach before writing the whole thing.
  3. Restate the input: its shape, its size, and what is guaranteed about it.
Follow-up
  • How does this change if the input no longer fits in memory?
  • Which test case would catch an off-by-one here?

Flag actors exceeding a rate ceiling in any sliding window

easyWorked solution
sliding windowbounded statestream processing

An event stream gives you (actor_id, action_kind, ts_ms) for engagement writes, already sorted by ts_ms: up to 200 million events over one day from up to 30 million distinct actors. Return every actor_id that at any point had more than K actions inside a window of W milliseconds, where K is at most 1000 and W at most 60000. The window slides continuously; it is not a fixed bucket. One pass over the stream. State time and space bounds, and say how memory stays bounded given that most of those actors are idle at any instant.

Approach
  1. Reduce the per-actor state to the minimum that can answer the question: you never need all of an actor's timestamps, only the K-th most recent one. Keep a K-slot ring buffer per actor; on each event, if the buffer is already full, compare ts against the oldest slot, and flag when the difference is within W, because that means K+1 events fall inside one window.
  2. Say why fixed tumbling buckets of width W are wrong rather than merely approximate: K events at the end of one bucket and K at the start of the next are 2K events inside a single W-wide window and never trip a bucketed counter. The undercount is structural, not a tuning issue.
  3. Bound memory by eviction, not by capacity: an actor whose most recent event is older than W can never contribute to any future window, so drop its buffer. Maintain a FIFO of (actor_id, ts) appended on every event and pop from the front while the front ts is older than now minus W, discarding an entry whose ts no longer matches that actor's latest event. That lazy-deletion pop is amortized O(1).
  4. Give the bounds in terms of the right variable: O(n) time overall, and O(A_w * K) space where A_w is the number of distinct actors active within any W-millisecond window, which at W = 60 seconds is orders of magnitude below 30 million. Quoting space as O(actors) instead of O(active actors) is the answer that makes this look infeasible when it is not.
  5. Fix the boundary convention before coding it. State whether the window is half-open, so that an event exactly W after the K-th previous one does not flag, and keep that convention identical in the eviction test, or the detector disagrees with itself at the edge.
Worked solution 20 min
  1. Implement the per-actor ring buffer of K timestamps with a write index, and the flag test comparing the incoming ts against the slot about to be overwritten.
  2. Add the eviction FIFO and the lazy-deletion check, then confirm on paper that an actor which goes quiet for longer than W has its buffer released.
  3. Construct the adversarial input by hand: K events in the last millisecond of one bucket and K in the first millisecond of the next, and verify your implementation flags while a bucketed one does not.
  4. State the space bound as O(A_w * K) with a concrete number for W = 60 seconds at the given event rate.
EXPECTED RESULTA set of flagged actor_ids from one pass: O(n) time, O(A_w * K) space, using a K-slot ring buffer per active actor, amortized O(1) lazy eviction of actors idle longer than W, and a stated half-open window convention.
Follow-up
  • The stream is now unsorted by up to 5 seconds of clock skew. What breaks first, and what is the minimum buffering that restores a correct answer?
  • You are given a fixed memory budget that may not grow with the active actor count. What structure do you reach for, and which direction does its error run: false flags or missed ones?
  • The product wants the count of distinct content items acted on in the window rather than the count of actions. What in your per-actor state has to change, and what does that do to the space bound?

For someone fluent in a dynamic language who has shipped real work but has never had to say what the runtime is doing underneath. The week is built on measuring and deliberately breaking things, because the questions that expose this background are the ones where the interviewer asks why a second time.

Small steps. Visible outcomes.0 / 7 completed
ONE WEEK · YOUR PACE

Prepare, practise & reflect

One practical outcome each day. Spend longer where you need it.

0 / 7 done
01Recruiter screen and a coding baseline
  • Write down your constraints (start date, location, work authorisation, competing deadlines) and your questions for the recruiter: team or organisation, whether the online assessment applies, allowed languages, and whether design is in scope at your level.
  • Choose your interview language and, from a blank file, implement k-group linked-list reversal. Test k = 1, k equal to the list length, k larger than it, and a final group shorter than k.
  • List every edge case you missed on the first run. That list becomes your checklist for the rest of the week.

Deliverable: A one-page recruiter-call sheet, plus a tested k-group reversal with your personal edge-case checklist.

Practice prompt ↗Practice prompt ↗Practice prompt ↗Worked solution ↗
02Cache structures with O(1) operations
  • Implement an LRU cache with a hash map and a doubly linked list. Then implement an LFU cache with a key-to-node map, a frequency-to-list map and a minimum-frequency value, matching the reported question.
  • Write tests that catch eviction bugs: fill to capacity, insert one more item, and check which key was evicted. For LFU, also check the tie-break between keys with equal frequency.
  • Add expiry to the LRU, as in the bank's expiring LRU question, and state what happens to an expired key that is never read again.
  • Explain how you would make the LRU thread-safe and what a single global lock costs.

Deliverable: Working LRU and LFU implementations with eviction tests, plus a written note on thread safety.

Practice prompt ↗Practice prompt ↗Practice prompt ↗
03Graphs, grids and sliding windows
  • Solve the fuel-limited grid question with Dijkstra over (row, column, fuel remaining), where a recharge station resets fuel. State the O(mnF log(mnF)) bound.
  • Start the zigzag grid question with the clarifying questions about revisits and allowed moves, then solve a version whose state graph is acyclic.
  • Solve course-schedule feasibility with a topological sort, and merge overlapping intervals, both from the bank.
  • Do this guide's sliding-window worked exercise on flagging actors who exceed a rate ceiling, and check the case where a burst straddles a bucket boundary.

Deliverable: Five solved problems, each with its state definition, its complexity and the edge case that nearly broke it.

Practice prompt ↗Practice prompt ↗
04CS fundamentals for the phone interview
  • Write the URL-to-page walk: DNS resolution, TCP three-way handshake, TLS negotiation, HTTP request and response, and where each step can fail.
  • Write short answers on TCP versus UDP, congestion control versus flow control, and retransmission when packets are lost.
  • Write short answers on MySQL clustered versus secondary indexes, B+ tree versus hash indexes for range queries, isolation levels and MVCC, and composite and covering indexes.
  • Write short answers on Redis sorted sets (a skip list plus a hash table for large sets), how Redis persists data without blocking its main loop, and on deadlock and memory visibility between threads.
  • Do this guide's SQL worked exercise on backfilling a live table, to connect index and lock theory to a real migration.

Deliverable: A page of fundamentals answers, with each weak point from a 'why? why?' drill with a partner marked for review.

Practice prompt ↗Practice prompt ↗Worked solution ↗
05System design: concurrency and consistency
  • Design the reported auction platform. Name the invariant for accepting a bid, where it is enforced, and how a message the queue delivers twice is made harmless.
  • Design the reported versioned key-value cache. Explain how versions stay strictly increasing per key, how concurrent reads and writes stay safe, and how keys are partitioned.
  • Design the global rate limiter: algorithm choice, where the counters live, and what happens when the counter store is unreachable.
  • Do this guide's cursor pagination worked exercise to practise specifying an API contract exactly.

Deliverable: Three design write-ups, each with its invariant, the failure it is built to survive, and the recovery path, plus the pagination contract.

Practice prompt ↗Practice prompt ↗
06Résumé deep dive and the final round
  • Write one page per project with the numbers you will quote, how each was measured, and the alternative you rejected for each major choice.
  • Answer the reported résumé questions in this guide's behavioral section out loud, and record yourself.
  • Work the debugging drill on vanished push notifications, and practise telling it as an ordered investigation, the same shape as the outage question.
  • Prepare questions for the hiring manager or HR partner about the team's systems and how its work is measured.

Deliverable: Project sheets, recorded answers to the résumé questions, and a list of questions for the final round.

Practice prompt ↗Practice prompt ↗
07Mock loop across all four categories
  • Run a mock phone interview: fundamentals questions first, then an unseen bank coding problem that you trace by hand before running.
  • Run a mock design round on the reported question about top-k trending posts over sliding windows, with global and regional rankings.
  • Run a mock résumé deep dive where the interviewer keeps asking follow-ups until you reach the limit of what you know, and note where that was.
  • Update your edge-case checklist and fundamentals notes with what the mocks exposed.

Deliverable: Notes from three mocks, with your top three gaps and what you will do about each before the interview.

Practice prompt ↗Practice prompt ↗Worked solution ↗

Expand any day for tasks and deliverables. Your progress is saved on this device.

The research notes say both engineers and hiring managers question candidates in detail about their past work. Be ready to show which parts you drove and how they work. Pick two or three projects. Fix the numbers you will quote and how each was measured, and have the rejected alternative ready for every major choice.

Unblock an engineer seeing duplicate items on page two

easy
mentoringpaginationcursors

An engineer on your team reports that users see the same items twice when they load page two of the feed. Their query is ORDER BY sort_key DESC LIMIT 40 OFFSET 40, and their proposed fix is to dedupe by content_id in the client. They are blocked, frustrated, and have been on it a day. Unblock them without taking the keyboard: get them to a reproduction, explain why the duplicates appear, why client-side dedup is the wrong layer, and what you would have them build instead.

Approach
  1. Get them to a deterministic reproduction before explaining anything. Insert k items at the head between the two requests and watch exactly k already-seen items reappear on page two. A reproduction they ran themselves teaches the mechanism; an explanation teaches them that you were right.
  2. Describe the cause as counting rather than as a bug. OFFSET defines a window by counting from the start of a result set that is mutating at the head, so k insertions above the window push k rows down into page two. Then show the half they have not seen: deletions shift the other way and skip rows entirely, with no signal to the client that anything was missed.
  3. Use the skip case to show why client dedup is the wrong layer. It suppresses the visible repeat and can do nothing about the invisible omission, because nothing ever told the client an item existed. Add the performance argument second: the database still produces and discards OFFSET rows, so page n costs more than page one even when no duplicate appears.
  4. Hand over the replacement with its precondition attached, because the precondition is where this bug comes back. Seek on the previous page's last key: WHERE owner_id = :owner AND sort_key < :cursor ORDER BY sort_key DESC LIMIT 40, served by the index on (owner_id, sort_key DESC). The key must be unique within the owner, or the boundary row is either repeated or dropped, which is why the sort key is the time-sortable content id rather than a timestamp that collides at high insert rates.
  5. Leave them the work and the proof: they write the query, the test that inserts at the head between page requests, and the plan check confirming an index scan rather than a sort. Then ask them to explain the skip case back to you, which is the only cheap way to find out whether the mentoring landed.
Follow-up
  • What must the cursor encode once a page merges pushed timeline entries with items pulled from above-threshold authors?
  • The product wants a 'new items above' indicator. How do you show what arrived above the cursor without breaking the page sequence?
  • What test would have caught this before release, and why did the existing tests pass?

Argue against filtering blocks at write time instead of read time

hard
design reviewdisagreementvisibilityread path

Your tech lead proposes removing the per-read block check: the fanout worker would skip any follower the author has blocked, so the feed never has to look. It removes a lookup from the highest-QPS path in the system. You are asked to review the design document. Write the argument you would make: what the proposal genuinely buys, the single case that falsifies it, the second falsifier that is independent of the first, what you would concede, and the alternative you would put in its place with its own cost stated.

Approach
  1. Concede the gain first and size it, because an objection that will not state what the proposal buys reads as obstruction. A block lookup sits on every feed read at essentially full platform read QPS, so removing it is worth real capacity; say roughly how much before you argue.
  2. Falsify with one case rather than five: the block is created after the item was already fanned out. Write-time filtering cannot see an edge that does not exist yet, so by construction there is a window where the blocked viewer holds a materialized entry pointing at the blocker's item. Blocks are created reactively, so this is the common case, not the corner case.
  3. Give a second falsifier independent of timing: the feed is one of several surfaces. Thread, profile, search, notification and a raw deep link all reach the item without touching the timeline, so write-time filtering secures one path while the guarantee is the conjunction of all of them.
  4. Price the retrofit honestly instead of asserting it is impossible. Making write-time filtering sufficient means scanning the blocked viewer's timeline at block creation and removing matching entries, which is bounded by the timeline cap and therefore tractable per block, but it must complete before the viewer's next read and it does nothing at all for the other surfaces.
  5. Put a costed alternative in its place: keep enforcement on the read path and make it cheap. Fetch the viewer's block set once per request rather than per item, filter against the denormalized timeline_entry.author_id so blocked authors are dropped without hydrating anything, and cache the set per viewer with write-through invalidation on block creation plus a short TTL as a backstop. State the staleness bound out loud, since a stale block cache is a correctness failure and not a stale count.
  6. Close with the concession that makes the proposal survive in a useful form: write-time filtering is acceptable as an optimization layered on top of the read filter, where it reduces the rows the filter must drop and is allowed to be wrong.
Follow-up
  • A page holds 40 items from 30 authors. Where exactly does the block check run so it is one lookup per request rather than 30?
  • Your lead says the exposure window is a few seconds and therefore acceptable. What evidence would change your mind, and what evidence would change theirs?
  • How do you prove the guarantee holds on every surface, and what test fails if someone adds a seventh surface next quarter?

Choose which feed debt ships and which blocks the launch

medium
technical debtcache invalidationscope cutting

Two weeks to launch, three known defects. First, like counts are maintained from an at-least-once stream with no dedup and no reconciliation job, so they drift upward on redelivery. Second, the per-viewer block set is cached with no invalidation on block creation, so a new block can take up to an hour to take effect. Third, hydration issues one lookup per item, so a 40-item page costs 40 sequential round trips instead of one batched read, and its latency grows linearly with page size. Decide what ships and what blocks the launch, how each is written down, and the rollback for anything you ship.

Approach
  1. Sort by which guarantee each defect gives up, not by how long each takes to fix. The first gives up numeric exactness, which this system already declares approximate between reconciliation runs. The second gives up a safety property the product states to users in absolute terms. The third gives up latency headroom.
  2. Block the block cache and say why in one line: a stale block set is a correctness failure with a named victim on a guarantee the product makes without qualification, and the fix is small, being write-through invalidation on block creation plus a short TTL as a backstop. A cheap fix to a safety defect is not debt, it is work you have not done yet.
  3. Ship the counter drift with two conditions written into the launch note: a stated bound on acceptable drift, and the rule that no authorization or eligibility decision may read the denormalized count. Schedule the reconciliation job from the engagement table with an owner and a date, and add a drift alarm so the bound is measured rather than assumed.
  4. Ship the hydration cost behind a measured limit rather than a hope. The defect is serial round trips, so the page's added latency is the page size times the per-lookup RTT until someone batches the fetch; cap the page size, measure p99 with realistic fan-in instead of a warm single-author page, and make the rollback a page-size config change rather than a deploy, so the person paged at 3am can act without a build.
  5. Write each item where the next on-call will read it, with an owner, a date and a trigger that fires without a human remembering, such as the drift alarm or a p99 threshold. Debt with a trigger gets paid; debt in a retrospective document does not.
  6. Say plainly what you told the people who wanted all three shipped: the deadline can buy scope, and it cannot buy a guarantee the product already promised.
Follow-up
  • Product argues a one-hour block delay is fine because blocks are rare. What is your answer, and does the rarity argument change anything?
  • Reconciliation runs and finds 4% drift rather than the 0.1% you assumed. What do you do about the numbers already shown to users?
  • Which of the three do you fix first after launch, and why is it not simply the slowest one?
  • 01

    Walk through the most complex system architecture you designed in a recent role. What were the bottleneck constraints, and why did you choose your tech stack over the alternatives?

  • 02

    Describe a critical production outage or edge-case failure in one of your projects. How did you triage, investigate and mitigate it?

  • 03

    How did you set up, track and validate stability and latency SLA metrics for the backend services you managed?

  • 04

    Describe a time you optimised a slow query or a bottlenecked service. Which tools and profiling techniques did you use?

  • 05

    Describe an architectural disagreement with a senior teammate or manager. How did you validate your approach with metrics or benchmarks?

  • 06

    If you have migrated a service from a monolith to microservices, what was the data migration strategy, and how did you ensure zero downtime?

PracHub interview preparation framework
Is this an official ByteDance interview guide?

No. It is PracHub's own research and practice material for the Software Engineer role at ByteDance. The rounds and questions reflect what candidates have reported, not a process ByteDance has published, and they change over time. Confirm the current format and scope with your recruiter.

PracHub interview research
How difficult are the live coding questions?

Candidate reports in this guide's research describe the coding questions as medium to hard. They emphasise algorithmic efficiency, matrix traversal, dynamic programming and string manipulation, and your code is expected to run during the session. Practise writing complete, runnable solutions and your own test inputs, not pseudocode.

PracHub interview research
How long does the process take from screen to offer?

The research notes give roughly four to six weeks for the five stages, and elsewhere three to six weeks from screen to offer. Feedback timing varies with team matching, time zones and holidays. If you have a competing deadline, ask the recruiter for the expected timeline at the first call.

PracHub interview research
Does every candidate take the online assessment?

No. Candidates report either taking an online assessment or going straight to a technical phone interview. Ask your recruiter which applies to you. Prepare the same coding material either way, since the phone interview also includes live coding.

PracHub Software Engineer practice
Is Mandarin required for Software Engineer roles?

According to the research notes, no. English is the working language in international offices such as the US, UK, Singapore and Canada. Some teams work with Mandarin-speaking engineering hubs, and Mandarin is listed as a nice-to-have for certain cross-regional teams. If a particular team matters to you, ask the recruiter.

PracHub interview research
What coding environment is used in live interviews?

Candidates describe video interviews with a shared web-based code editor, such as a Lark code pad. You can usually choose your language and run code against your own test inputs. Practise writing and running your own test cases, and tracing variables by hand, since the notes say candidates are sometimes asked to trace before running.

PracHub interview research
What should I study first?

The research notes advise starting CS theory and system design early instead of focusing only on live coding. Cover all four categories: algorithms and data structures, system design, CS fundamentals (networking, database internals, operating systems, Redis), and deep dives into your own projects. Prepare in the language you know best, plus the middleware you have actually used, such as Redis, Kafka or a relational database.

PracHub Software Engineer practice
Can I reapply if I do not pass?

The research notes say candidates can reapply after a waiting period, typically six months. Confirm the current policy with your recruiter. Spend the time on the specific gaps the loop exposed, whether coding speed, CS theory or design depth.

PracHub Software Engineer practice
Sources & methodology 3 sources ↗

Official role evidence, timestamped platform data and clearly labeled preparation advice.