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.
EvaluatesGraph 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).
EvaluatesRecognizing 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.
EvaluatesHandling 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.
EvaluatesReal-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.
EvaluatesOwnership, impact, and honest self-attribution.
Practice these with a free AI mock
Get graded on your real answers, with feedback after every round.
Practice free