Twitter / X
Real-time social platform with petabyte-scale data and ML ranking systems.
4 Rounds
~14 Days
Hard
The Interview Loop
Recruiter Screen (30 min)
Standard fit check, behavioral questions, and resume overview.
Technical Loop (3-4 Rounds)
Deep dive into domain knowledge, coding, and system design.
Interview Question Bank
Machine Learning Engineer
•
Behavioral
•
medium
Tell me about a time you had to ship a complex ML feature under an extremely tight deadline. What corners did you cut?
#Delivery
#Prioritization
#Trade-offs
Machine Learning Engineer
•
Behavioral
•
medium
Describe a time you strongly disagreed with a senior engineer or manager on a technical decision. How was it resolved?
#Conflict Resolution
#Communication
#Leadership
Machine Learning Engineer
•
Behavioral
•
medium
How do you prioritize fixing technical debt versus shipping new product features?
#Prioritization
#Product Sense
#Engineering Excellence
Machine Learning Engineer
•
Behavioral
•
medium
Tell me about a production outage you caused or helped resolve. What was the root cause and how did you prevent it from happening again?
#Incident Management
#Accountability
#Post-mortems
Machine Learning Engineer
•
Behavioral
•
medium
Twitter/X is known for a 'hardcore' engineering culture. Can you share an experience where you had to take extreme ownership of a failing project?
#Ownership
#Resilience
#Leadership
Machine Learning Engineer
•
Coding
•
medium
Implement a rate limiter for the Twitter API.
#System Design
#Concurrency
#Data Structures
Machine Learning Engineer
•
Coding
•
medium
Given a stream of tweets, write an algorithm to find the Top K trending hashtags in the last 1 hour.
#Heaps
#Sliding Window
#Stream Processing
Machine Learning Engineer
•
Coding
•
medium
Design a data structure that supports insert, delete, and getRandom in O(1) time.
#Hash Tables
#Arrays
#Design
Machine Learning Engineer
•
Coding
•
medium
Given k sorted arrays of tweet timestamps, merge them into a single sorted array.
#Heaps
#Divide and Conquer
#Sorting
Machine Learning Engineer
•
Coding
•
medium
Find the shortest path between two users in a massive social graph (degrees of separation).
#Graph Theory
#BFS
#Bidirectional Search
Machine Learning Engineer
•
Coding
•
easy
Design an algorithm to detect cycles in a directed graph (e.g., detecting retweet loops or bot rings).
#Graph Theory
#DFS
Machine Learning Engineer
•
Coding
•
medium
Implement a Trie (Prefix Tree) to support insertion, search, and prefix search. This is used for hashtag autocomplete.
#Tries
#Strings
#Data Structures
Machine Learning Engineer
•
Coding
•
hard
Given a stream of tweets, write a function to keep track of the median engagement score in a sliding window.
#Heaps
#Sliding Window
#Stream Processing
Machine Learning Engineer
•
System Design
•
hard
Design the 'For You' timeline ranking system. How do you balance engagement metrics like retweets and likes with negative signals like 'show less often'?
#Recommendation Systems
#Ranking
#Architecture
#Real-time ML
Machine Learning Engineer
•
System Design
•
hard
How would you design a real-time bot detection system for Twitter?
#Anomaly Detection
#Streaming Data
#Classification
#Graph ML
Machine Learning Engineer
•
System Design
•
hard
Design an Ad Click-Through Rate (CTR) prediction model. How do you handle delayed feedback when users click an ad hours after viewing it?
#Ads Ranking
#CTR Prediction
#Data Pipelines
Machine Learning Engineer
•
System Design
•
medium
Design a distributed counter system for Tweet views that can handle millions of concurrent updates.
#Distributed Systems
#Scalability
#Caching
Machine Learning Engineer
•
System Design
•
hard
Design the autocomplete and relevance ranking system for Twitter Search.
#Search
#Information Retrieval
#Tries
#Ranking
Machine Learning Engineer
•
System Design
•
medium
Design a system to recommend 'Who to Follow' to a user.
#Recommendation Systems
#Graph ML
#Batch Processing
Machine Learning Engineer
•
System Design
•
hard
Design a system to extract and rank trending topics in real-time across multiple languages.
#NLP
#Stream Processing
#System Architecture
Machine Learning Engineer
•
System Design
•
medium
Design a multimodal model architecture to classify NSFW content in tweets containing both text and images.
#Multimodal ML
#Computer Vision
#NLP
#Classification
Machine Learning Engineer
•
System Design
•
hard
Design a system to serve Grok (LLM) responses to users in real-time while maintaining the context of their recent tweets and timeline.
#LLMs
#System Architecture
#RAG
#Real-time ML
Machine Learning Engineer
•
Technical
•
hard
Explain how you would train a Graph Neural Network (GNN) on the Twitter follower graph to generate user embeddings.
#Graph Neural Networks
#Embeddings
#Distributed Training
Machine Learning Engineer
•
Technical
•
medium
How do you handle the cold start problem for new users in the 'For You' feed?
#Cold Start
#Recommendation Systems
#Heuristics
Machine Learning Engineer
•
Technical
•
medium
Contrast Two-Tower models with Cross-Attention models. Why do we use Two-Tower for candidate generation and Cross-Attention for final ranking?
#Deep Learning
#Information Retrieval
#Model Architecture
Machine Learning Engineer
•
Technical
•
hard
How do you evaluate a Generative LLM used for summarizing long Twitter threads or generating Grok responses?
#LLMs
#Evaluation Metrics
#NLP
Machine Learning Engineer
•
Technical
•
hard
Explain the contrastive loss function used in training user-tweet embeddings. How do you select hard negatives?
#Loss Functions
#Representation Learning
#Embeddings
Machine Learning Engineer
•
Technical
•
medium
How would you detect hate speech or toxic replies in real-time under strict latency constraints?
#NLP
#Classification
#Real-time ML
#Efficiency
Machine Learning Engineer
•
Technical
•
hard
What are the trade-offs between using FAISS (IVF-PQ) vs. HNSW for approximate nearest neighbor search in tweet retrieval?
#Vector Databases
#ANN
#Information Retrieval
Machine Learning Engineer
•
Technical
•
hard
Explain how you would implement distributed training for a multi-billion parameter language model (like Grok).
#LLMs
#Distributed Training
#Deep Learning
Machine Learning Engineer
•
Technical
•
medium
How do you address position bias in the Twitter feed ranking model?
#Bias Mitigation
#Ranking
#Data Science
Machine Learning Engineer
•
Technical
•
hard
How would you use Reinforcement Learning to optimize long-term user engagement on the platform?
#Reinforcement Learning
#Recommendation Systems
#Optimization
Machine Learning Engineer
•
Technical
•
medium
Explain the difference between offline evaluation (e.g., NDCG, MAP) and online evaluation (A/B testing) for the home timeline. Why might they disagree?
#Evaluation Metrics
#A/B Testing
#Data Science
Machine Learning Engineer
•
Technical
•
medium
How do you handle severe class imbalance when training a spam detection model where spam is less than 0.1% of all tweets?
#Imbalanced Data
#Classification
#Loss Functions
Machine Learning Engineer
•
Technical
•
hard
What techniques would you use to reduce the inference latency of a deep learning ranking model in production from 100ms to 20ms?
#Model Optimization
#Inference
#Efficiency
Difficulty Radar
Based on recent AI-sourced data.
Meet Your Interviewers
The "Standard" Interviewer
Senior EngineerFocuses on core competencies, system constraints, and clear communication.
SimulateUnwritten Rules
Think Out Loud
Always explain your thought process before writing code or drawing architecture.