Tiktok Interview Questions
Practice the exact questions companies are asking right now.
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...
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...
Compare Random Forests and Boosted Trees: Bias, Variance, Speed
Scenario A product/data science team is deciding between Random Forests and Gradient-Boosted Decision Trees (e.g., XGBoost) for a new predictive task....
Explain FlashAttention, KV cache, and RoPE
You are interviewing for an LLM-focused role. 1. FlashAttention - Explain what problem it solves in transformer attention. - Describe the high-l...
Maximize watched duration under consecutive-sum limit
You have a list of videos in a feed. Video i has duration d[i] (positive integer). A user has an “attention span” limit A. You want to select a subset...
Solve two grid problems (islands + min-cost path)
You are given two separate coding questions. Problem A: Count distinct islands (translation-equivalent) Given an m x n binary grid grid (0 = water, 1 ...
Find k-th smallest subarray sum
Problem You are given an integer array nums of length n where all elements are positive integers, and an integer k. Consider all non-empty contiguous ...
Design a content moderation system
Design a content moderation system for a large-scale product where users can submit content (e.g., text posts, images, videos, comments, or messages)....
Explain how Kafka works
Prompt Explain how Apache Kafka works at a high level and then in more detail. Cover at least: - Core entities: broker, topic, partition, producer, co...
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...
Implement local maxima, bagging, and k-means
Solve the following programming tasks. 1) Find all “local maxima” in a streaming temperature array You are cleaning sensor data for temperature-fluctu...
Answer ML fundamentals and diagnostics questions
You are taking a timed online assessment with multiple-select and numeric-response questions. 1) Confusion-matrix metrics (multiple select) A binary c...
Find longest common subsequence length
Given two strings s and t, compute the length of their longest common subsequence (LCS). A subsequence is obtained by deleting zero or more characters...
Find length of longest common subsequence
Given two strings s and t, return the length of their longest common subsequence. A subsequence is obtained by deleting zero or more characters withou...
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...
Write monthly customer and sales SQL queries
You are analyzing a food-delivery marketplace. Tables Assume the following schema (you may add minor helper CTEs as needed): orders - order_id (BIGINT...
Tiktok DS Interview Questions
Scenario: You are provided with two tables: minute_streamed and minute_viewed. The minute_streamed table records each minute of streaming activity, wh...
Compute balances, rejections, and platform reserve
You are given a set of transactions in CSV-like format with columns: - account_name, timestamp, currency, amount Assume: - Transactions for all accoun...
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...
Design low-latency large-scale hotel booking system
You are asked to design the backend for a large-scale hotel booking system that runs behind a very high-traffic consumer app (think a TikTok-like app ...