ByteDance
5 questions · Coding · System design
Count the number of islands in a 2D grid of land and water.
CodingApproachFlood-fill each unvisited land cell with BFS/DFS and mark visited; count how many fills you start.
They look forGraph traversal on a grid, visited-state management, and complexity analysis.
Given course prerequisites, decide whether all courses can be finished.
CodingApproachBuild a directed graph and run topological sort (Kahn/BFS or DFS cycle detection).
They look forRecognizing a cycle-detection problem behind a word problem.
Design a social news feed.
System designApproachDiscuss fan-out on write vs. read, ranking, pagination, and the celebrity/hot-key problem.
They look forHandling scale skew and picking the right fan-out strategy.
Design a real-time chat / messaging system.
System designApproachCover connection handling (WebSocket), delivery/ordering guarantees, storage, and presence.
They look forReal-time delivery, ordering, and durability under scale.
Describe a project you are most proud of and your specific contribution.
BehavioralApproachAnchor to measurable impact; be crisp about what YOU did vs. the team, and the trade-offs you made.
They look forOwnership, impact, and honest self-attribution.
Rehearse these out loud
Practice your answers privately, with coaching notes you can revise against. Nobody else sees them.
Practice free