Bytedance Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Count buggy vs non-buggy by employer
Count buggy vs non-buggy submissions for each employer_id, including employers with zero submissions. Return employer_id, buggy_count, non_buggy_count...
Maximize products bought under budget
Given N products and M customers, for each customer find the list of distinct products they can buy without exceeding their budget such that the numbe...
Design recommendations objective balancing growth and monetization
Design a Multi-Objective Recommender for Long-Form Content You are designing the ranking objective and measurement plan for a long-form content recomm...
Design an interference-robust A/B test for monetization
A/B Test Design: New Tipping UI on Creator Posts Context: You are launching a new tipping UI on creator (PGC/OGC) posts to increase creator monetizati...
Compute and rank top bad advertisers
SQL on ad safety. Assume the following schema and sample rows. Use ANSI SQL. Today is 2025-09-01; interpret “last 7 days” as 2025-08-26 00:00:00 to 20...
Model overdispersed counts; estimate treatment lift
Weekly posts per creator are overdispersed and zero‑inflated. In a creator‑level randomized test of a nudge: - Control: n_c=40,000 creators, total pos...
Generate all safe queen placements on board
You are given an integer n representing the size of a chessboard (n × n). You need to place n queens on the board so that no two queens attack each ot...
Define QKV for recommender cross-attention
You are designing a deep-learning–based recommendation system that uses a Transformer-style cross-attention block to model the interaction between a u...
Find kth smallest in sorted 2D matrix
You are given an n x m matrix of integers where each row and each column is sorted in non-decreasing order. You are also given an integer k such that ...
Design system to detect privacy-leak records
You are given a very large database that contains user data (both structured fields and unstructured text such as logs, messages, and documents). The ...
Explain DPO and construct its training data
You are working on a project to fine-tune a large language model (LLM) using Direct Preference Optimization (DPO). Answer the following: 1. Conceptual...
Compute maximum path sum in binary tree
Given the root of a binary tree where each node contains an integer value (which may be negative), return the maximum possible sum of values along any...
Explain Java ConcurrentHashMap and queues
An interviewer asks you conceptual questions about Java's concurrency primitives. Explain in detail: 1. How Java's ConcurrentHashMap is implemented in...
Select max-discount product per category
You have a catalog of products. For each category, return exactly one product: the one with the largest absolute discount; if multiple products in the...
Implement streaming SRM detector with late events
Implement a streaming detector for sample ratio mismatch (SRM) across many concurrent experiments. Input is two topic-partitioned streams: assignments...
Demonstrate leadership in cross-functional disagreement
Behavioral & Leadership (HR Screen, Data Scientist) Prompt Describe a time you disagreed with a partner team (e.g., product pushing for more aggressiv...
Write SQL for 7-day geo-localized revenue dashboard
Write a single SQL query (assume PostgreSQL; tz_offset is an integer hour offset from UTC) to compute a 7-day dashboard by local user date for US vs A...
Compute cluster-aware significance and sequential corrections
Cluster-Randomized Tipping UI Experiment: Power, Sequential Testing, and Multiplicity Context: A creator-level (cluster) randomized experiment evaluat...
Investigate visit–report correlation causality
Causal Diagnosis: Do More Ad Page Visits Cause More Reports? Context You observe a positive correlation between the number of ad page visits and the p...
Analyze shopping funnel with joins and windows
Write SQL (PostgreSQL) to analyze a 4-step shopping funnel: view_product → add_to_cart → checkout_start → purchase. Use the schema and sample data bel...