Bytedance Interview Questions
Practice the exact questions companies are asking right now.
What skills are needed for AI infra roles?
You interviewed for an AI infrastructure / LLM serving internship role and were told the rejection reason was insufficient familiarity with vLLM, incl...
Calculate transaction fees from CSV records
You are given a CSV-like multi-line string representing transactions with columns: id,reference,amount,currency,date,merchant_id,buyer_country,transac...
Verify business accounts with progressive KYC rules
You are implementing a simplified KYC verification pipeline for onboarding business accounts. Each account contains these text fields: - business_name...
Minimize total factory cost with distance penalties
You must choose construction options for factories to minimize a total cost. Input format: - options[i] is a list of options for factory i. - Each opt...
Find linked user records by weighted similarity
You are given a list of user records. Each record has fields: - id (unique) - name - email - company You are also given: - weights: a map from field n...
Design and decompose Trust & Safety risk metrics
You are a Data Scientist in a Trust & Safety team for a short-video platform (similar to TikTok/Reels). The team asks: “How would you design risk metr...
Determine if a string can be segmented
Given a string s and a list of strings wordDict, determine whether s can be segmented into a sequence of one or more dictionary words. - You may reuse...
Reverse nodes in even-length linked-list groups
Problem Given the head of a singly linked list, you will traverse the list in contiguous groups of increasing size: the 1st group has size 1, the 2nd ...
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...
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...
When prioritize precision vs recall
Context You are working on a product team and building (or evaluating) a binary classifier that triggers an action (e.g., show a warning, block conten...
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...
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...
Write SQL for geo posting-frequency drops
Using the schema below, write a single ANSI SQL query (window functions allowed) that identifies countries with the largest share of creators whose po...
Resolve user roles across account hierarchy
You are given: 1. An account hierarchy: `json accounts = [ {"accountId": "org_1", "parent": null}, {"accountId": "wksp_1", "parent": "org_1"} ] ` ...
Answer core Python, CS, DB, and testing questions
Fundamentals (Python / CS / DB / OS / Web / Testing) Answer the following interview prompts. Keep answers precise, with examples and tradeoffs. A) Tes...
Solve grid shortest-path and tree DP
Problem A — Shortest path in a maze (BFS) You are given a 2D grid representing a maze: - grid[r][c] is either '.' (open cell) or '#' (wall). - You are...
Match payments to invoices with fallback rules
You are given two datasets: - invoices: each invoice has invoice_id, date, amount - payments: each payment has payment_id, optional invoice_id (may be...
Validate CSV rows under multiple verification rules
You are given a multi-line string representing a CSV dataset. - The first line is a header. - Each subsequent line contains exactly 6 columns: col1,co...