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
Backend Engineer
•
Behavioral
•
medium
Tell me about a time you strongly disagreed with a technical direction proposed by leadership. How did you handle it?
#Conflict Resolution
#Communication
#Ownership
Backend Engineer
•
Behavioral
•
medium
How do you prioritize technical debt versus shipping new features in a fast-paced environment?
#Prioritization
#Technical Debt
#Productivity
Backend Engineer
•
Behavioral
•
medium
Tell me about a time you caused a production outage. What was the root cause, and what did you learn?
#Accountability
#Post-mortems
#Learning
Backend Engineer
•
Behavioral
•
medium
Tell me about a time you had to dive into an undocumented, legacy codebase to fix a critical bug.
#Problem Solving
#Adaptability
#Debugging
Backend Engineer
•
Behavioral
•
medium
Tell me about a time you had to ship a critical feature under an extremely tight deadline. What trade-offs did you make?
#Delivery
#Prioritization
#Trade-offs
Backend Engineer
•
Coding
•
hard
Implement a basic LFU (Least Frequently Used) Cache.
#Hash Map
#Linked List
#Design
Backend Engineer
•
Coding
•
medium
Given an array of intervals representing active ad campaigns, merge all overlapping intervals to find the total continuous time ads are running.
#Array
#Sorting
#Intervals
Backend Engineer
•
Coding
•
medium
Given a stream of tweets, write an algorithm to find the top K trending hashtags over the last 1 hour.
#Heap
#Hash Map
#Sliding Window
Backend Engineer
•
Coding
•
medium
Given a list of user connections (follower/following), write a function to find the shortest connection path between two users (Degrees of Separation).
#Graph
#BFS
#Bidirectional BFS
Backend Engineer
•
Coding
•
hard
Write an algorithm to serialize and deserialize a tree of threaded replies (N-ary tree) to a string and back.
#Tree
#DFS
#Serialization
Backend Engineer
•
Coding
•
medium
Implement a Trie (Prefix Tree) to support autocomplete for user handles (@mentions).
#Trie
#Design
#String
Backend Engineer
•
Coding
•
medium
Given a list of tweets with timestamps, find the maximum number of tweets published within any 5-minute sliding window.
#Sliding Window
#Two Pointers
#Array
Backend Engineer
•
Coding
•
easy
Given two arrays representing the followers of User A and User B, write a function to return their mutual followers. Optimize for large arrays.
#Array
#Hash Set
#Two Pointers
Backend Engineer
•
Coding
•
medium
Write a function to detect if there is a cycle in a retweet chain (represented as a directed graph).
#Graph
#DFS
#Cycle Detection
Backend Engineer
•
Coding
•
easy
Implement a function to parse a tweet string and extract all unique hashtags and user mentions, returning them in the order they appeared.
#String Manipulation
#Regex
#Hash Set
Backend Engineer
•
Coding
•
medium
Write a function to implement an LRU (Least Recently Used) Cache. This is often used for caching user profiles in memory.
#Linked List
#Hash Map
#Design
Backend Engineer
•
Coding
•
easy
Given a string containing a tweet, check if it is a palindrome, ignoring spaces, punctuation, and casing.
#String
#Two Pointers
Backend Engineer
•
System Design
•
hard
Design a real-time spam/bot detection system that evaluates tweets as they are published.
#Stream Processing
#Machine Learning
#Rules Engine
Backend Engineer
•
System Design
•
medium
Design Twitter's URL shortener (t.co). Focus on high availability and analytics tracking.
#Hashing
#Database Sharding
#Analytics
Backend Engineer
•
System Design
•
hard
Design the backend for Community Notes. How do you handle concurrent edits, version history, and fast retrieval?
#Concurrency Control
#Database Design
#Eventual Consistency
Backend Engineer
•
System Design
•
hard
Design the Direct Message (DM) system. How do you handle real-time delivery, read receipts, and offline users?
#WebSockets
#Pub/Sub
#Database Design
Backend Engineer
•
System Design
•
hard
Design the 'For You' timeline. How do you mix algorithmic recommendations with tweets from people the user follows?
#Recommendation Systems
#Fan-out
#Machine Learning Infrastructure
Backend Engineer
•
System Design
•
medium
Design the 'View Count' feature for tweets that was recently rolled out. How do you ensure high throughput and low latency without overwhelming the database?
#Caching
#Event Sourcing
#Data Aggregation
Backend Engineer
•
System Design
•
hard
Design a distributed rate limiter for the X API to handle different tiers of users (Free, Basic, Pro) with varying limits.
#Distributed Systems
#Rate Limiting
#Redis
Backend Engineer
•
System Design
•
medium
Design a Distributed ID Generator (like Snowflake) to generate unique IDs for tweets at a massive scale.
#Distributed Systems
#ID Generation
#Concurrency
Backend Engineer
•
System Design
•
medium
Design a system to securely store and serve media (images/videos) uploaded by users.
#Blob Storage
#CDN
#Media Processing
Backend Engineer
•
System Design
•
hard
Design a notification system that sends push notifications to millions of users simultaneously when a major news event occurs.
#Push Notifications
#Queueing
#Scalability
Backend Engineer
•
Technical
•
medium
How would you optimize a slow PostgreSQL query that is fetching a user's timeline and joining multiple tables (users, tweets, media)?
#SQL
#Indexing
#Query Optimization
Backend Engineer
•
Technical
•
hard
How would you handle a 'Thundering Herd' problem when a celebrity with 100 million followers tweets, and millions of users try to reply or like it simultaneously?
#Concurrency
#Caching
#Load Balancing
Backend Engineer
•
Technical
•
hard
You are tasked with migrating a legacy monolithic service to microservices to reduce compute costs. How do you approach this with zero downtime?
#Microservices
#Migration
#Strangler Fig Pattern
Backend Engineer
•
Technical
•
hard
How do you handle eventual consistency in a distributed database? Give an example of where strict consistency is required vs where eventual consistency is acceptable at X.
#CAP Theorem
#Consistency Models
#Databases
Backend Engineer
•
Technical
•
medium
Explain how Kafka partitions work. If a consumer group is lagging behind the producer in a timeline ingestion topic, how do you troubleshoot and resolve it?
#Kafka
#Message Queues
#Troubleshooting
Backend Engineer
•
Technical
•
medium
You notice a sudden spike in 503 Service Unavailable errors on the Timeline service. Walk me through your troubleshooting steps.
#Incident Response
#Monitoring
#Debugging
Backend Engineer
•
Technical
•
medium
Discuss the trade-offs between using gRPC vs REST for internal microservice communication at X.
#Networking
#gRPC
#API Design
Backend Engineer
•
Technical
•
hard
Explain how garbage collection works in the JVM. How would you tune it for a high-throughput backend service?
#JVM
#Garbage Collection
#Performance Tuning
Cloud Engineer
•
Behavioral
•
medium
How do you handle taking ownership of a legacy system where the original creators have left the company, there is minimal documentation, and it frequently fails?
#Legacy Systems
#Ownership
#Resilience
Cloud Engineer
•
Behavioral
•
medium
X has a strong focus on efficiency. Tell me about a time you had to drastically reduce cloud infrastructure costs. What was your approach and the outcome?
#Cost Optimization
#Impact
#Problem Solving
Cloud Engineer
•
Behavioral
•
medium
Describe a situation where you had to push back on a product or feature deployment because of infrastructure stability or security concerns. How did you handle the conflict?
#Communication
#Conflict Resolution
#Ownership
Cloud Engineer
•
Behavioral
•
medium
X moves extremely fast and sometimes things break. Tell me about a time you had to deploy a critical fix or make a major infrastructure decision with incomplete information.
#Adaptability
#Decision Making
#High Pressure
Cloud Engineer
•
Behavioral
•
hard
Tell me about the most complex production outage you've ever debugged. What was the root cause, how did you find it, and what did you do to ensure it never happened again?
#Incident Management
#Debugging
#Post-mortems
Cloud Engineer
•
Behavioral
•
easy
Describe a time you automated a tedious operational task. How did you identify the opportunity, what did you build, and how did you measure the impact?
#Automation
#Toil Reduction
#Initiative
Cloud Engineer
•
Behavioral
•
medium
Tell me about a time you strongly disagreed with a senior engineer or architect on a system design choice. How did you articulate your point, and what was the resolution?
#Communication
#Technical Debate
#Teamwork
Cloud Engineer
•
Coding
•
medium
Write a script (Python/Boto3 or Bash/AWS CLI) to automate the detection and rotation of AWS IAM access keys older than 90 days across multiple accounts.
#Python
#AWS IAM
#Security
#Automation
Cloud Engineer
•
Coding
•
medium
Write a Python script to parse a 50GB Nginx access log file and output the top 10 IP addresses making requests. Optimize for memory usage.
#Python
#Log Parsing
#Memory Management
#Data Structures
Cloud Engineer
•
Coding
•
medium
Given a list of microservices and their dependencies (e.g., Service A depends on Service B), write an algorithm to determine a valid deployment order.
#Graphs
#Topological Sort
#Algorithms
Cloud Engineer
•
Coding
•
medium
Implement a rate limiter class in Python or Go using the Token Bucket algorithm. It should support multiple users identified by user_id.
#Python
#Go
#Rate Limiting
#Concurrency
Cloud Engineer
•
Coding
•
easy
Write a Bash one-liner or short script to find and gracefully terminate all zombie processes on a Linux machine.
#Bash
#Linux
#Process Management
Cloud Engineer
•
Coding
•
medium
Given a list of server connection logs represented as [start_time, end_time], write a function to find the maximum number of concurrent connections and the time it occurred.
#Algorithms
#Sweep Line
#Sorting
Cloud Engineer
•
Coding
•
medium
Write a Terraform module to provision a secure AWS VPC with 2 public subnets, 2 private subnets, a NAT gateway, and strict security groups allowing only internal traffic to the private subnets.
#Terraform
#AWS
#Networking
Cloud Engineer
•
Coding
•
medium
Implement a function that takes an IPv4 address string and a CIDR block string (e.g., '192.168.1.5', '192.168.1.0/24') and returns a boolean indicating if the IP belongs to the CIDR block.
#Networking
#Bit Manipulation
#Python
#Go
Cloud Engineer
•
System Design
•
medium
Architect a disaster recovery plan for X's core authentication service. How do you ensure RTO (Recovery Time Objective) is under 1 minute and RPO (Recovery Point Objective) is zero?
#Disaster Recovery
#High Availability
#Databases
#Failover
Cloud Engineer
•
System Design
•
hard
X has recently moved several workloads from AWS back to on-prem bare metal to save costs. Walk me through how you would architect the migration of a massive stateful service (like a distributed database) from AWS to an on-prem data center with zero downtime.
#Cloud Migration
#Bare Metal
#Database Replication
#Networking
Cloud Engineer
•
System Design
•
hard
Design a global rate-limiting service for the X API that can handle millions of requests per second across multiple geographic regions.
#Rate Limiting
#Distributed Systems
#Redis
#Concurrency
Cloud Engineer
•
System Design
•
hard
How would you design a highly available, multi-region Kubernetes cluster architecture to host X's core microservices?
#Kubernetes
#High Availability
#Multi-region
#Service Mesh
Cloud Engineer
•
System Design
•
medium
Design a cost-optimized storage tiering system for X's media assets (images and videos) that balances retrieval speed with AWS S3/GCS storage costs.
#Storage
#Cost Optimization
#AWS S3
#CDN
Cloud Engineer
•
System Design
•
hard
Design an infrastructure deployment pipeline capable of deploying a critical security patch to 10,000+ nodes in under 5 minutes without causing a global outage.
#CI/CD
#Automation
#Deployment Strategies
#Infrastructure as Code
Cloud Engineer
•
System Design
•
hard
Design the cloud infrastructure to support Twitter's timeline generation at scale, ensuring sub-200ms latency for 500 million daily active users.
#Scalability
#Caching
#Load Balancing
#Microservices
Cloud Engineer
•
System Design
•
medium
Design a distributed caching layer for trending topics that can handle extreme traffic spikes (e.g., during the Super Bowl or a major global news event).
#Caching
#Redis
#Memcached
#Thundering Herd
Cloud Engineer
•
Technical
•
hard
Describe the process of tuning a Linux kernel for high-throughput network traffic, specifically to handle millions of concurrent TCP connections.
#Linux
#Networking
#Kernel Tuning
#TCP/IP
Cloud Engineer
•
Technical
•
medium
You notice a sudden 500ms latency spike in a critical microservice running on EKS. Walk me through your exact troubleshooting steps.
#Kubernetes
#Observability
#Networking
#Debugging
Cloud Engineer
•
Technical
•
hard
Describe how you would architect a Prometheus and Grafana monitoring stack to ingest and query metrics from a fleet of 50,000 servers efficiently.
#Prometheus
#Grafana
#Monitoring
#Scalability
Cloud Engineer
•
Technical
•
medium
What are the engineering and financial tradeoffs between using managed cloud databases (like AWS RDS or GCP Spanner) versus self-hosting databases on bare metal servers?
#Cost Optimization
#Databases
#Bare Metal
#Cloud Computing
Cloud Engineer
•
Technical
•
medium
How do you secure internal microservice-to-microservice communication across different cloud VPCs or hybrid environments?
#Security
#Networking
#mTLS
#Service Mesh
Cloud Engineer
•
Technical
•
hard
Explain BGP routing. How does X use BGP to announce IP prefixes for its global CDN network?
#BGP
#CDN
#Routing
#Networking
Cloud Engineer
•
Technical
•
medium
What happens at the OS and container level when a Kubernetes pod runs out of memory (OOMKilled)? How do you debug and prevent it?
#Kubernetes
#Linux
#Memory Management
#Docker
Cloud Engineer
•
Technical
•
hard
How does Kubernetes handle network partitions between nodes? Explain the split-brain scenario and how etcd consensus prevents it.
#Kubernetes
#Distributed Systems
#etcd
#Consensus Algorithms
Cloud Engineer
•
Technical
•
hard
How would you implement zero-downtime database schema migrations for a live service handling 100k queries per second?
#Databases
#Migrations
#High Availability
Cloud Engineer
•
Technical
•
easy
Explain the difference between an Application Load Balancer (ALB) and a Network Load Balancer (NLB). When would you explicitly choose an NLB for a service at X?
#Load Balancing
#AWS
#OSI Model
Cloud Engineer
•
Technical
•
medium
How do you manage Terraform state for a massive, multi-team infrastructure without causing locking bottlenecks or state file corruption?
#Terraform
#State Management
#Collaboration
#CI/CD
Cloud Engineer
•
Technical
•
medium
Walk me through the lifecycle of a DNS query when a user types x.com, focusing specifically on how global load balancing and Anycast routing are involved.
#DNS
#Load Balancing
#Anycast
#BGP
Data Engineer
•
Behavioral
•
medium
Tell me about a time you had to ship a critical data pipeline under an extremely tight, almost impossible deadline.
#Time Management
#Prioritization
#Hardcore Work Ethic
Data Engineer
•
Behavioral
•
medium
Describe a situation where you identified a massive cost inefficiency in cloud infrastructure and the steps you took to fix it.
#Cost Optimization
#Proactivity
#Cloud Architecture
Data Engineer
•
Behavioral
•
medium
How do you handle working in an environment with high ambiguity, minimal documentation, and rapidly changing product requirements?
#Adaptability
#Ambiguity
#Communication
Data Engineer
•
Behavioral
•
medium
Tell me about a time you disagreed with a senior engineer about a technical architecture decision. How was it resolved?
#Conflict Resolution
#Technical Communication
#Ego
Data Engineer
•
Behavioral
•
medium
Walk me through a time when a data pipeline you owned failed in production, causing downstream impact. How did you debug and resolve it?
#Incident Management
#Debugging
#Accountability
Data Engineer
•
Coding
•
easy
Given a list of trending search terms, group the anagrams together.
#Strings
#Hash Maps
Data Engineer
•
Coding
•
medium
Parse a log file of Twitter events to find the top 10 most active users in a given 1-hour window.
#Log Parsing
#Hash Maps
#Sorting
#Priority Queue
Data Engineer
•
Coding
•
medium
Implement a sliding window algorithm to count the number of tweets containing a specific hashtag in the last 5 minutes.
#Sliding Window
#Queues
#Real-time Processing
Data Engineer
•
Coding
•
hard
Given K sorted streams of tweet IDs (in chronological order), merge them into a single sorted stream.
#Heaps
#Pointers
#Stream Processing
Data Engineer
•
Coding
•
hard
Find the shortest path between two users in the Twitter follower graph.
#Graphs
#BFS
#Bidirectional Search
Data Engineer
•
Coding
•
medium
Implement a rate limiter for the Twitter API using a token bucket algorithm.
#Concurrency
#System Design
#Object-Oriented Design
Data Engineer
•
Coding
•
medium
Design an algorithm to find the Top K frequent words in a continuous stream of tweets (Heavy Hitters problem).
#Count-Min Sketch
#Heaps
#Streaming Algorithms
Data Engineer
•
Coding
•
medium
Implement an LRU Cache to store recently accessed user profiles.
#Linked Lists
#Hash Maps
#Caching
Data Engineer
•
Coding
•
medium
Implement a Trie data structure to support Twitter search autocomplete.
#Trees
#Trie
#String Manipulation
Data Engineer
•
Coding
•
easy
Write a function to validate a JSON payload representing a Tweet object, ensuring all required fields are present and correctly typed.
#JSON
#Type Checking
#Error Handling
Data Engineer
•
System Design
•
hard
Design an ad-click attribution pipeline that handles late-arriving events and ensures exactly-once processing.
#Exactly-Once Semantics
#Watermarks
#Data Pipelines
Data Engineer
•
System Design
•
hard
How would you architect the migration of a massive on-premise Hadoop cluster to GCP BigQuery with zero downtime?
#Cloud Migration
#BigQuery
#Dual Writes
#Data Validation
Data Engineer
•
System Design
•
hard
Design a real-time trending topics system capable of processing millions of tweets per second.
#Heavy Hitters
#Stream Processing
#Distributed Systems
Data Engineer
•
System Design
•
hard
Design the data pipeline for Twitter's View Count feature, ensuring real-time updates and high throughput.
#Stream Processing
#Kafka
#Redis
#Event Sourcing
Data Engineer
•
System Design
•
medium
Design a relational data model for Twitter Spaces analytics, tracking hosts, listeners, and duration.
#Entity-Relationship
#Normalization
#Fact/Dimension Tables
Data Engineer
•
System Design
•
hard
How would you design the batch and streaming data pipelines to generate features for the 'For You' timeline recommendation engine?
#Feature Store
#Lambda Architecture
#Graph Processing
Data Engineer
•
System Design
•
hard
Design a data lake architecture for storing, partitioning, and querying 10PB of daily tweet logs efficiently.
#Data Lake
#Partitioning
#Parquet
#Iceberg/Hudi
Data Engineer
•
System Design
•
hard
Architect a streaming system to detect spam and bot activity in real-time as tweets are published.
#Machine Learning Pipelines
#Real-time Streaming
#Feature Engineering
Data Engineer
•
Technical
•
medium
How does Kafka handle message ordering, and how would you ensure ordered processing of a single user's tweets across partitions?
#Kafka
#Partitioning
#Message Ordering
Data Engineer
•
Technical
•
hard
How would you handle exactly-once processing semantics in a Kafka to BigQuery streaming pipeline?
#Exactly-Once
#Kafka
#BigQuery
#Idempotency
Data Engineer
•
Technical
•
hard
Explain how you would optimize a PySpark job that is suffering from severe data skew due to a viral tweet from Elon Musk.
#Spark
#Data Skew
#Salting
#Broadcast Joins
Data Engineer
•
Technical
•
hard
Write a SQL query to calculate the conversion rate of ad impressions to clicks within a 1-hour window for each ad campaign.
#Time-based Joins
#Aggregations
#Performance Tuning
Data Engineer
•
Technical
•
medium
Write a SQL query to find users who have retweeted a specific tweet but do not follow the original author.
#Joins
#Subqueries
#Set Operations
Data Engineer
•
Technical
•
medium
Write a SQL query to find the top 3 trending hashtags per country on a given day using window functions.
#Window Functions
#Ranking
#CTEs
Data Engineer
•
Technical
•
medium
Write a SQL query to calculate the 7-day rolling average of tweets per user.
#Window Functions
#Aggregations
#Time Series
Data Engineer
•
Technical
•
easy
Explain the differences between Parquet and Avro file formats. When would you use each in our data ecosystem?
#File Formats
#Parquet
#Avro
#Columnar vs Row-based
Data Engineer
•
Technical
•
medium
Compare Apache Flink and Spark Streaming. Which would you choose for calculating real-time engagement metrics at X, and why?
#Flink
#Spark Streaming
#Micro-batching vs Native Streaming
Data Engineer
•
Technical
•
medium
Given a table of user follows, write a SQL query to find all mutuals (users who follow each other).
#Self Joins
#Filtering
Data Engineer
•
Technical
•
medium
Write a SQL query to find the median number of followers for users who joined X in 2023.
#Percentiles
#Window Functions
#Statistics
Data Engineer
•
Technical
•
easy
Write a SQL query to identify potential bots by finding users who tweeted more than 100 times in a single minute.
#GROUP BY
#HAVING
#Date Truncation
Data Scientist
•
Behavioral
•
medium
Tell me about a time you had to ship a data science model or analysis under an extremely tight deadline. What corners did you cut?
#Execution
#Prioritization
#Bias for Action
Data Scientist
•
Behavioral
•
medium
Why do you want to work at X, and how do you handle rapid, unexpected changes in company direction or product strategy?
#Adaptability
#Resilience
#Motivation
Data Scientist
•
Behavioral
•
easy
X operates with a very lean team and fast-paced environment. How do you prioritize your tasks when everything is labeled 'high priority'?
#Time Management
#Impact
#Adaptability
Data Scientist
•
Behavioral
•
easy
Explain the concept of a p-value to a non-technical Product Manager who wants to launch a feature based on an A/B test.
#Statistics
#Stakeholder Management
Data Scientist
•
Behavioral
•
medium
Describe a situation where you disagreed with a product manager or engineering lead on a key metric. How did you resolve it?
#Conflict Resolution
#Data-Driven
#Leadership
Data Scientist
•
Behavioral
•
medium
Tell me about a time your data analysis proved a widely held assumption within your company wrong.
#Analytical Thinking
#Influence
#Communication
Data Scientist
•
Coding
•
hard
Write a SQL query to calculate the Day 1 and Day 7 retention rates for users who recently subscribed to X Premium.
#Cohort Analysis
#Self Joins
#Date Functions
Data Scientist
•
Coding
•
medium
Write a SQL query to calculate the 3-day rolling average of tweet impressions for each user over the past month.
#Window Functions
#Aggregation
#Time Series
Data Scientist
•
Coding
•
medium
Write a SQL query to find the top 3 creators by ad revenue payout in each geographic region for the last quarter.
#Ranking
#Window Functions
#Joins
Data Scientist
•
Coding
•
easy
Write a Python function to parse and extract all unique trending hashtags from a massive stream of tweet texts efficiently.
#Regex
#Strings
#Data Structures
Data Scientist
•
Coding
•
easy
Write a SQL query to find users who liked a specific tweet but do not follow the author of that tweet.
#Joins
#Filtering
#Set Operations
Data Scientist
•
Coding
•
medium
Given a dataset of user sessions, write a Python script to merge overlapping session time intervals.
#Sorting
#Intervals
#Arrays
Data Scientist
•
Coding
•
hard
Write a SQL query to calculate the median time between a user's account creation and their first tweet.
#Percentiles
#Date Math
#CTEs
Data Scientist
•
Coding
•
easy
Write a Python function to calculate the cosine similarity between two sparse user-feature vectors.
#Math
#Arrays
#Linear Algebra
Data Scientist
•
Coding
•
medium
Write a SQL query to find the percentage of tweets that receive at least one reply within 5 minutes of being posted.
#Date/Time Functions
#Joins
#Aggregation
Data Scientist
•
Coding
•
medium
Given an array of daily tweet counts for a specific hashtag, write a Python function to find the longest contiguous streak of days where the count strictly increased.
#Arrays
#Dynamic Programming
Data Scientist
•
Coding
•
hard
Write a SQL query to identify 'bot rings'—groups of 5 or more users who have retweeted the exact same set of 10 tweets within a 1-hour window.
#Complex Joins
#Grouping
#Anomaly Detection
Data Scientist
•
Coding
•
medium
Implement a basic TF-IDF algorithm from scratch in Python for a small corpus of tweets.
#NLP
#Hash Maps
#Math
Data Scientist
•
Coding
•
hard
Write a SQL query to calculate the 'viral coefficient' of a tweet (average number of new retweets generated by each retweet).
#Graph Data
#Recursive CTEs
#Aggregation
Data Scientist
•
System Design
•
hard
Design a recommendation system for the 'For You' timeline. How do you balance chronological relevance with algorithmic personalization?
#Recommender Systems
#Ranking
#Two-Tower Models
Data Scientist
•
System Design
•
hard
Design a Graph ML system to power the 'Who to Follow' recommendations.
#Graph Neural Networks
#Link Prediction
#Scalability
Data Scientist
•
System Design
•
medium
How would you design a system to rank 'Trending Topics' in real-time?
#Ranking
#Time Decay
#NLP
Data Scientist
•
System Design
•
hard
How would you build a machine learning model to detect spam or bot accounts in real-time as they register or tweet?
#Anomaly Detection
#Streaming
#Classification
Data Scientist
•
Technical
•
medium
How would you deal with highly skewed data, such as user follower counts, when building a regression model?
#Data Transformation
#Outliers
#Modeling
Data Scientist
•
Technical
•
medium
How would you predict user churn for X Premium subscribers? What features would be most important?
#Classification
#Survival Analysis
#Feature Engineering
Data Scientist
•
Technical
•
hard
How do you evaluate the trade-off between increasing ad load in the timeline and potential degradation of user engagement?
#Trade-offs
#Monetization
#Experimentation
Data Scientist
•
Technical
•
hard
When would you choose a Multi-Armed Bandit approach over traditional A/B testing for optimizing ad placements on X?
#Multi-Armed Bandit
#Reinforcement Learning
#Optimization
Data Scientist
•
Technical
•
medium
We noticed a sudden 10% drop in Daily Active Users (DAU) on X. Walk me through how you would investigate the root cause.
#Debugging
#Analytics
#Product Sense
Data Scientist
•
Technical
•
hard
How would you optimize the creator ad revenue sharing model to ensure fairness while maximizing overall platform content creation?
#Optimization
#Allocation
#Economics
Data Scientist
•
Technical
•
medium
If a user has a 10% chance of seeing an ad on any given page load, what is the probability they see at least one ad in 5 page loads?
#Probability
#Binomial Distribution
Data Scientist
•
Technical
•
hard
How would you design an A/B test to evaluate the impact of the 'Community Notes' feature on the spread of misinformation?
#A/B Testing
#Metrics Definition
#Misinformation
Data Scientist
•
Technical
•
medium
What metrics would you define to measure the success of the X Premium (formerly Twitter Blue) subscription service?
#Monetization
#KPIs
#Strategy
Data Scientist
•
Technical
•
medium
How would you build an NLP model to classify and hide highly toxic replies in a tweet thread?
#NLP
#Classification
#Trust & Safety
Data Scientist
•
Technical
•
hard
If we introduce long-form tweets, how do you account for the novelty effect in your A/B test analysis?
#Statistical Significance
#Novelty Effect
#User Behavior
Data Scientist
•
Technical
•
hard
How do you handle network effects and interference when running an A/B test on a highly connected social graph like X?
#Network Effects
#Graph Clustering
#A/B Testing
DevOps Engineer
•
Behavioral
•
hard
X moves extremely fast and sometimes breaks things. Tell me about a time you had to bypass standard procedures to ship something critical on a tight deadline.
#Agility
#Risk Management
#Decision Making
DevOps Engineer
•
Behavioral
•
medium
You are given 5 critical P0 issues at the exact same time during a major site-wide event. How do you prioritize and handle them?
#Prioritization
#Incident Management
#Communication
DevOps Engineer
•
Behavioral
•
medium
Tell me about a time you strongly disagreed with a technical decision made by leadership. How did you handle it, and what was the outcome?
#Conflict Resolution
#Communication
#Ownership
DevOps Engineer
•
Behavioral
•
medium
You receive an alert that API latency has spiked by 400% globally. Walk me through your incident response process from acknowledgment to resolution.
#SRE
#Incident Response
#On-call
#Post-mortem
DevOps Engineer
•
Behavioral
•
medium
Tell me about a time you had to work extremely long hours to resolve a critical production outage. How did you handle the pressure and team dynamics?
#Resilience
#Teamwork
#High Pressure
DevOps Engineer
•
Coding
•
easy
Write a function to validate if a given string is a valid IPv4 or IPv6 address without using built-in IP validation libraries.
#String Manipulation
#Networking
#Validation
DevOps Engineer
•
Coding
•
easy
Write a script in Python or Bash to parse a massive Nginx access log file, extract all IP addresses, and return the top 10 IPs that encountered 5xx HTTP status codes.
#Bash
#Python
#Log Parsing
#Regex
DevOps Engineer
•
Coding
•
hard
Implement a basic rate limiter in Python using a token bucket algorithm to protect our Tweet posting API from abuse.
#Python
#Rate Limiting
#Concurrency
#Algorithms
DevOps Engineer
•
Coding
•
easy
Write a script to recursively find and delete files older than 30 days in a given directory, but keep files with a '.log' extension.
#Bash
#Linux
#File Management
DevOps Engineer
•
Coding
•
medium
Given a list of server logs with timestamps, write a program to find the peak traffic window of exactly 5 minutes.
#Sliding Window
#Data Processing
#Time Series
DevOps Engineer
•
Coding
•
medium
Write a script to query a Prometheus HTTP API endpoint and trigger a Slack webhook alert if CPU usage across a cluster exceeds 90% for 5 consecutive minutes.
#Python
#Prometheus
#API Integration
#Alerting
DevOps Engineer
•
Coding
•
hard
Write a Terraform module to provision an AWS EKS cluster with managed node groups, VPC CNI, and IAM OIDC integration.
#Terraform
#AWS
#EKS
#IAM
DevOps Engineer
•
Coding
•
medium
Write a Bash script to monitor disk usage. If any partition exceeds 85%, the script should find the top 5 largest directories in that partition and email the report.
#Bash
#Linux
#Monitoring
DevOps Engineer
•
System Design
•
hard
Design the caching layer for the X timeline using Redis to handle millions of concurrent reads and thousands of writes per second.
#Redis
#Caching
#High Throughput
#Data Modeling
DevOps Engineer
•
System Design
•
hard
We are moving away from managed cloud services to self-hosted solutions to save money. How would you design a highly available, self-hosted Kafka cluster across 3 data centers?
#Kafka
#Distributed Systems
#Bare-metal
#High Availability
DevOps Engineer
•
System Design
•
hard
Design a multi-region Kubernetes cluster architecture for X's timeline service to ensure 99.99% uptime, even if an entire region goes offline.
#Kubernetes
#High Availability
#Disaster Recovery
#Global Load Balancing
DevOps Engineer
•
System Design
•
medium
How do you implement zero-downtime deployments for a stateless microservice receiving 100k requests per second?
#Deployment Strategies
#Load Balancing
#Kubernetes
DevOps Engineer
•
System Design
•
hard
We recently migrated a significant portion of our infrastructure from cloud back to bare-metal to optimize costs. Walk me through how you would architect the automated provisioning of 10,000 bare-metal servers across multiple data centers.
#Bare-metal
#Automation
#PXE
#Ansible
#Data Center
DevOps Engineer
•
System Design
•
hard
Explain how you would implement aggressive auto-scaling for stateless microservices to handle sudden viral events (like the Super Bowl) while minimizing idle compute costs.
#Auto-scaling
#KEDA
#Kubernetes
#Cost Optimization
DevOps Engineer
•
System Design
•
medium
Design a monitoring and alerting stack for a newly launched live video streaming feature on X. What metrics are most critical?
#Prometheus
#Grafana
#Video Streaming
#SLIs/SLOs
DevOps Engineer
•
Technical
•
medium
How does DNS resolution work? Walk me through the steps, and explain how you would configure DNS failover for a global service.
#DNS
#Failover
#Routing
DevOps Engineer
•
Technical
•
hard
X has a massive monorepo. How would you optimize our CI pipeline to reduce build and test times from 45 minutes to under 10 minutes?
#Bazel
#Caching
#Parallelization
#Monorepo
DevOps Engineer
•
Technical
•
medium
We need to reduce our AWS/GCP cloud bill by $10M a month. Walk me through your strategy to identify and eliminate waste in a Kubernetes-heavy environment.
#FinOps
#Kubernetes
#Cloud Compute
#Resource Requests/Limits
DevOps Engineer
•
Technical
•
medium
What exactly happens under the hood when you run `kubectl apply -f deployment.yaml`?
#Kubernetes Architecture
#API Server
#etcd
#Kubelet
#Controllers
DevOps Engineer
•
Technical
•
easy
How do you troubleshoot a Kubernetes pod that is stuck in CrashLoopBackOff, especially if the container logs are completely empty?
#Kubernetes
#Debugging
#Containers
DevOps Engineer
•
Technical
•
medium
A user complains that images on X are loading slowly in a specific geographic region (e.g., Southeast Asia). How do you troubleshoot this?
#CDN
#DNS
#Latency
#BGP
#Traceroute
DevOps Engineer
•
Technical
•
hard
Explain the TCP 3-way handshake. How would you tune TCP parameters on a Linux kernel to handle millions of high-throughput, low-latency connections?
#TCP/IP
#Linux Kernel
#Sysctl
#Networking
DevOps Engineer
•
Technical
•
hard
How do you perform a schema migration on a massive PostgreSQL database table with billions of rows without locking the table or causing downtime?
#PostgreSQL
#Database Migrations
#Zero-downtime
DevOps Engineer
•
Technical
•
medium
How do you manage Terraform state files in a team of 50 engineers to prevent race conditions, state corruption, and security leaks?
#Terraform
#State Management
#Security
DevOps Engineer
•
Technical
•
easy
What is an inode? What happens when a Linux system runs out of inodes even if there is plenty of disk space left, and how do you fix it?
#Linux Filesystem
#Inodes
#Troubleshooting
DevOps Engineer
•
Technical
•
hard
How would you handle stateful sets in Kubernetes for a high-throughput, distributed database like Cassandra?
#StatefulSets
#Cassandra
#Persistent Volumes
#Storage
DevOps Engineer
•
Technical
•
medium
Explain the difference between eventual consistency and strong consistency. Give an example of where you would use each within X's architecture.
#Distributed Systems
#CAP Theorem
#Databases
DevOps Engineer
•
Technical
•
medium
Describe your approach to managing secrets in a CI/CD pipeline. How do you prevent developers from accidentally hardcoding API keys?
#Secret Management
#Vault
#CI/CD
#DevSecOps
DevOps Engineer
•
Technical
•
medium
A PostgreSQL database is experiencing 100% CPU utilization and extremely slow queries. How do you identify the root cause and resolve it?
#PostgreSQL
#Performance Tuning
#Troubleshooting
DevOps Engineer
•
Technical
•
medium
How do you calculate and enforce Error Budgets and SLOs for a critical service like the Tweet posting API?
#SLOs
#Error Budgets
#SRE Practices
Frontend Engineer
•
Behavioral
•
medium
How do you prioritize your tasks when faced with multiple high-severity production issues at the same time?
#Incident Management
#Prioritization
#Stress Management
Frontend Engineer
•
Behavioral
•
medium
Describe a time you had to learn a new technology or framework over a weekend to deliver a feature. How do you approach rapid learning?
#Adaptability
#Continuous Learning
#Drive
Frontend Engineer
•
Behavioral
•
medium
X moves at an incredibly fast pace. Give an example of how you adapt to rapidly changing requirements mid-sprint.
#Agility
#Flexibility
#Mindset
Frontend Engineer
•
Behavioral
•
hard
Tell me about a time you identified a major performance bottleneck in a frontend application and how you fixed it.
#Performance
#Profiling
#Optimization
Frontend Engineer
•
Behavioral
•
medium
Tell me about a time you had to ship a critical feature under an extremely tight deadline. How did you ensure quality while moving fast?
#Time Management
#Prioritization
#Execution
Frontend Engineer
•
Behavioral
•
medium
Describe a situation where you disagreed with a product manager or designer about a technical constraint. How did you resolve it?
#Communication
#Conflict Resolution
#Collaboration
Frontend Engineer
•
Behavioral
•
hard
Tell me about a time you took ownership of a failing project or a severely buggy codebase and turned it around.
#Ownership
#Problem Solving
#Resilience
Frontend Engineer
•
Coding
•
medium
Write a function that parses a raw tweet string, finds all @handles and #hashtags, and returns an array of objects representing the text segments and their types for rendering.
#Parsing
#Regex
#Data Transformation
Frontend Engineer
•
Coding
•
medium
Create an image carousel component. Implement lazy loading so that images are only fetched when they are one slide away from being visible.
#Component Design
#Lazy Loading
#State Management
Frontend Engineer
•
Coding
•
medium
Implement a rate limiter function in JavaScript. It should take a function, a limit (number of calls), and a time window, and drop any calls that exceed the limit within the window.
#Algorithms
#Time Complexity
#Closures
Frontend Engineer
•
Coding
•
easy
Write a polyfill for `Array.prototype.reduce`.
#Prototypes
#Array Methods
#Functional Programming
Frontend Engineer
•
Coding
•
easy
Implement a custom `useDebounce` React hook that takes a value and a delay, and returns the debounced value.
#Hooks
#Timers
#Closures
Frontend Engineer
•
Coding
•
medium
Write a React component that implements Infinite Scrolling from scratch without using third-party libraries.
#Intersection Observer
#DOM APIs
#Pagination
Frontend Engineer
•
Coding
•
medium
Build a Tweet character counter function that takes a string and returns the count, but URLs should always count as exactly 23 characters regardless of their actual length.
#String Manipulation
#Regex
#Edge Cases
Frontend Engineer
•
Coding
•
medium
Implement a custom `EventEmitter` class in JavaScript with `on`, `off`, `emit`, and `once` methods.
#Design Patterns
#Data Structures
#Closures
Frontend Engineer
•
Coding
•
hard
Write a function to deeply flatten a nested DOM tree into a single flat array of nodes, maintaining depth-first order.
#Recursion
#Tree Traversal
#DOM APIs
Frontend Engineer
•
Coding
•
medium
Implement `Promise.all()` from scratch. It should take an array of promises and return a single promise that resolves with an array of results, or rejects immediately if any promise rejects.
#Asynchronous Programming
#Promises
#Error Handling
Frontend Engineer
•
Coding
•
easy
Create a custom `usePrevious` hook in React that returns the value of a state variable from the previous render cycle.
#Hooks
#Refs
#Component Lifecycle
Frontend Engineer
•
Coding
•
medium
Write a function to deeply merge two JavaScript objects. If a key contains an array in both objects, concatenate them. If it's an object, merge recursively.
#Recursion
#Object Manipulation
#Type Checking
Frontend Engineer
•
Coding
•
medium
Implement a generic `memoize` function. Add a feature where the memoized values expire after a given Time To Live (TTL) in milliseconds.
#Caching
#Closures
#Time Complexity
Frontend Engineer
•
Coding
•
hard
Build a simple virtualized list component in React. It should accept an array of 100,000 items, a row height, and a viewport height, and only render the visible DOM nodes.
#Performance
#DOM Manipulation
#Math
Frontend Engineer
•
System Design
•
hard
Design the Twitter / X Home Timeline. Focus on the frontend architecture, data fetching strategy, and rendering performance for a feed with thousands of tweets containing rich media.
#Virtualization
#Pagination
#State Management
#Performance
Frontend Engineer
•
System Design
•
hard
Design the Tweet Composer. How would you handle the 280-character limit, rich text highlighting (mentions, hashtags), media uploads, and optimistic UI updates upon submission?
#ContentEditable
#Optimistic UI
#File Uploads
#Regex
Frontend Engineer
•
System Design
•
medium
Design the Twitter Search Autocomplete dropdown. How do you ensure high performance and prevent race conditions when a user types rapidly?
#Debouncing
#Caching
#Race Conditions
#Accessibility
Frontend Engineer
•
System Design
•
medium
Design the Notifications dropdown. How would you architect the real-time updates for likes, retweets, and mentions?
#WebSockets
#Server-Sent Events
#State Synchronization
Frontend Engineer
•
System Design
•
hard
Design the Direct Messaging (DM) interface. Focus on offline support, real-time message delivery, and read receipts.
#WebSockets
#IndexedDB
#Offline First
#Optimistic UI
Frontend Engineer
•
System Design
•
medium
Design a Poll widget for a Tweet. How do you handle state synchronization across multiple clients and calculate/animate percentages in real-time?
#Component Design
#Animation
#Data Synchronization
Frontend Engineer
•
System Design
•
medium
Design the 'Trending Topics' sidebar. Discuss your data fetching strategy and how you would keep the list fresh without overwhelming the server.
#Polling
#Caching
#Component Lifecycle
Frontend Engineer
•
Technical
•
medium
What are the security implications of rendering user-generated content (like Tweets) and how do you prevent XSS attacks in a modern frontend framework?
#XSS
#Sanitization
#Content Security Policy
Frontend Engineer
•
Technical
•
medium
Explain how you would implement accessibility (a11y) features for the Tweet composer, ensuring it is fully usable by screen readers and keyboard-only users.
#A11y
#ARIA
#Keyboard Navigation
Frontend Engineer
•
Technical
•
medium
Describe how you would implement optimistic UI updates when a user clicks the 'Like' button on a tweet, including error handling and rollback.
#Optimistic UI
#Error Handling
#Network Requests
Frontend Engineer
•
Technical
•
medium
How do you handle state management for a global entity like the 'current user' versus highly localized state like a 'tweet draft' in a large-scale React app?
#State Management
#Redux
#Context API
Frontend Engineer
•
Technical
•
medium
How would you architect a frontend application to support multiple themes (e.g., Light, Dim, Lights Out) dynamically without requiring a page reload?
#CSS Variables
#Theming
#Context
Frontend Engineer
•
Technical
•
medium
Explain how React 18's concurrent features (like useTransition and Suspense) can be used to improve the responsiveness of the Twitter feed.
#React 18
#Concurrency
#UX
Frontend Engineer
•
Technical
•
hard
How would you optimize the Core Web Vitals (LCP, CLS, INP) specifically for a user's Twitter profile page?
#Core Web Vitals
#Optimization
#Rendering Strategies
Full Stack Engineer
•
Behavioral
•
hard
What is the most complex system you have built from scratch, and what were the key technical trade-offs you had to make?
#Architecture
#Trade-offs
#End-to-End Ownership
Full Stack Engineer
•
Behavioral
•
hard
Describe a time you had to take over a legacy codebase with no documentation and the original authors had left. How did you approach it?
#Adaptability
#Problem Solving
#Legacy Code
Full Stack Engineer
•
Behavioral
•
medium
X operates with a hardcore engineering culture. Tell me about a time you had to ship a critical feature under an extremely tight, almost unreasonable deadline.
#Time Management
#Prioritization
#Resilience
Full Stack Engineer
•
Behavioral
•
medium
Tell me about a time you identified a major performance bottleneck in your system and took the initiative to fix it without being asked.
#Initiative
#Performance
#Ownership
Full Stack Engineer
•
Behavioral
•
medium
How do you handle disagreements with a senior engineer or product manager regarding the technical direction of a project?
#Conflict Resolution
#Communication
#Teamwork
Full Stack Engineer
•
Behavioral
•
medium
X moves very fast, often requiring decisions without full context. Tell me about a time you had to make a technical decision with incomplete information.
#Decision Making
#Ambiguity
#Risk Management
Full Stack Engineer
•
Behavioral
•
hard
Describe a situation where you had to debug a severe production outage. What was your process from discovery to post-mortem?
#Incident Management
#Debugging
#Communication
Full Stack Engineer
•
Coding
•
medium
Given a stream of tweets, write an algorithm to find the Top K frequent words (Trending Topics) in the last hour.
#Heaps
#Hash Maps
#Stream Processing
Full Stack Engineer
•
Coding
•
medium
Implement a custom debounce function in JavaScript that supports both leading and trailing edge execution. This is used for the search bar on X.
#JavaScript
#Closures
#Asynchronous Programming
Full Stack Engineer
•
Coding
•
easy
Write a function to parse a raw tweet string and extract all valid hashtags, ignoring punctuation immediately following the tag.
#String Parsing
#Regex
Full Stack Engineer
•
Coding
•
medium
Design and implement an LRU (Least Recently Used) Cache to store recently fetched tweets on the client side.
#Linked Lists
#Hash Maps
#Caching
Full Stack Engineer
•
Coding
•
easy
Implement a deep clone function for a complex state object in React, ensuring that nested objects, arrays, and Date objects are copied by value, not reference.
#JavaScript
#Recursion
#Object Manipulation
Full Stack Engineer
•
Coding
•
hard
Find the shortest path between two users on X (Degrees of Separation). You are given an API call `getFollowers(userId)`.
#Graph Traversal
#BFS
#Bidirectional BFS
Full Stack Engineer
•
Coding
•
medium
Implement an autocomplete system for @mentions. As the user types, return the top 5 matching usernames based on a combination of prefix match and the user's interaction frequency.
#Trie
#Hash Maps
#Sorting
Full Stack Engineer
•
Coding
•
hard
Given K sorted arrays representing timelines of users you follow, merge them into a single sorted timeline of the most recent tweets.
#Heaps
#Merge Sort
#Arrays
Full Stack Engineer
•
Coding
•
medium
Implement a rate limiter for the X API that allows a user to make N requests per time window T. How would you handle this in a distributed environment?
#Sliding Window
#Concurrency
#Distributed Systems
Full Stack Engineer
•
Coding
•
medium
Write a function to calculate the length of a Tweet. Note that URLs always count as 23 characters, and emojis/special Unicode characters should be counted correctly as single characters despite surrogate pairs.
#String Manipulation
#Regex
#Unicode
Full Stack Engineer
•
System Design
•
hard
Design a real-time Direct Messaging (DM) system for X, supporting 1-on-1 and group chats with read receipts.
#WebSockets
#NoSQL
#Real-time
#Pub/Sub
Full Stack Engineer
•
System Design
•
hard
Design a system to detect and filter out spam or bot replies in real-time before they are rendered to users.
#Machine Learning
#Stream Processing
#Rules Engine
Full Stack Engineer
•
System Design
•
hard
Design an ad-serving system for the X feed. How do you select the most relevant ad in under 50ms?
#Machine Learning Inference
#Low Latency
#Auction Algorithms
Full Stack Engineer
•
System Design
•
hard
Design the architecture for X Spaces (live audio rooms). How do you handle thousands of listeners and multiple speakers with low latency?
#WebRTC
#Audio Streaming
#SFU
#Scalability
Full Stack Engineer
•
System Design
•
medium
Design a search system to find specific tweets by a user within a specific date range.
#Elasticsearch
#Inverted Index
#Data Partitioning
Full Stack Engineer
•
System Design
•
medium
Design X's push notification system. How do you ensure notifications are delivered reliably and not duplicated?
#Message Queues
#APNs/FCM
#Idempotency
Full Stack Engineer
•
System Design
•
hard
Design a video upload and processing pipeline for X. Users can upload up to 2 hours of 1080p video.
#Blob Storage
#Asynchronous Processing
#CDN
#Video Encoding
Full Stack Engineer
•
System Design
•
hard
Design the Like and Retweet counter system. How do you handle the massive write load when a tweet goes viral?
#Eventual Consistency
#Batching
#Distributed Counters
Full Stack Engineer
•
System Design
•
hard
Design X's Trending Topics system. How do you calculate trends in real-time across different geographic regions?
#Stream Processing
#Apache Kafka
#Count-Min Sketch
#Distributed Systems
Full Stack Engineer
•
System Design
•
hard
Design the X Home Timeline. How do you ensure sub-second latency for users with millions of followers?
#Fanout
#Caching
#Message Queues
#Database Sharding
Full Stack Engineer
•
Technical
•
hard
What strategies would you use to optimize the initial load time (Time to Interactive / First Contentful Paint) of the X web application?
#Performance
#SSR
#Code Splitting
#Web Vitals
Full Stack Engineer
•
Technical
•
medium
Explain how you would implement optimistic UI updates for the 'Like' button on a tweet. How do you handle network failures?
#UX
#State Management
#Error Handling
Full Stack Engineer
•
Technical
•
medium
X uses GraphQL heavily. How does GraphQL help in reducing over-fetching in the web app compared to REST, and what are the caching challenges?
#GraphQL
#REST
#Caching
Full Stack Engineer
•
Technical
•
hard
Explain how you would handle state management for a complex web app like X Pro (formerly TweetDeck) with multiple independent columns updating in real-time.
#State Management
#Redux
#React Context
#Architecture
Full Stack Engineer
•
Technical
•
medium
Describe the differences between Server-Sent Events (SSE) and WebSockets. Which would you choose for streaming new tweets to the client and why?
#WebSockets
#SSE
#HTTP
Full Stack Engineer
•
Technical
•
medium
How do you prevent Cross-Site Scripting (XSS) attacks when rendering user-generated content, such as tweets with links and formatting, in the browser?
#XSS
#Security
#Sanitization
Full Stack Engineer
•
Technical
•
medium
How would you optimize the rendering performance of an infinite scrolling list of tweets in React to prevent DOM bloat and memory leaks?
#React
#Virtualization
#Performance
Full Stack Engineer
•
Technical
•
hard
Explain database sharding strategies for storing billions of user relationships (followers/following). What is the shard key?
#Database Sharding
#Scalability
#RDBMS
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
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
•
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
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
How do you prioritize fixing technical debt versus shipping new product features?
#Prioritization
#Product Sense
#Engineering Excellence
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
•
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
•
Coding
•
medium
Implement a rate limiter for the Twitter API.
#System Design
#Concurrency
#Data Structures
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
•
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 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
•
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
•
System Design
•
hard
Design the autocomplete and relevance ranking system for Twitter Search.
#Search
#Information Retrieval
#Tries
#Ranking
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 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 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
•
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 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
•
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 a system to extract and rank trending topics in real-time across multiple languages.
#NLP
#Stream Processing
#System Architecture
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
•
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
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
•
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
•
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
How do you address position bias in the Twitter feed ranking model?
#Bias Mitigation
#Ranking
#Data Science
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
•
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
•
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
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
•
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
•
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
•
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
•
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
Product Manager
•
Behavioral
•
hard
How do you manage engineering teams that are experiencing high burnout or turnover?
#Empathy
#Team Management
#Culture
Product Manager
•
Behavioral
•
medium
Give an example of how you used data to change a stubborn stakeholder's mind.
#Influence
#Data-Driven
#Communication
Product Manager
•
Behavioral
•
hard
Describe a time you strongly disagreed with executive leadership on a product direction. How did you handle it?
#Conflict Resolution
#Communication
#Data-Driven Decisions
Product Manager
•
Behavioral
•
medium
How do you prioritize features when your engineering resources are cut in half unexpectedly?
#Prioritization
#Resource Management
#Agility
Product Manager
•
Behavioral
•
medium
Tell me about a time you had to make a critical product decision with incomplete or ambiguous data.
#Decision Making
#Ambiguity
#Risk Management
Product Manager
•
Behavioral
•
medium
Tell me about a product or feature you launched that completely failed. What was the root cause, and what did you learn?
#Learning
#Accountability
#Self-Awareness
Product Manager
•
Behavioral
•
medium
Tell me about a time you had to ship a critical feature under an extremely tight deadline with limited resources.
#Execution
#Resilience
#Prioritization
Product Manager
•
Behavioral
•
medium
Tell me about a time you had to pivot a product strategy due to a sudden market change or competitor launch.
#Adaptability
#Strategy
#Agility
Product Manager
•
Coding
•
medium
Write a SQL query to find the top 5% of users by tweet volume over the last 30 days who are NOT subscribed to X Premium.
#Data Analysis
#SQL
#Monetization
Product Manager
•
Coding
•
medium
Write a SQL query to find the average time it takes for a Community Note to be published after a tweet is created.
#SQL
#Performance Metrics
#Data Analysis
Product Manager
•
Coding
•
medium
Write a SQL query to identify potential bot accounts based on tweet frequency (>100 per day) and a follower-to-following ratio of less than 0.1.
#Trust & Safety
#SQL
#Data Analysis
Product Manager
•
Coding
•
hard
Write a SQL query to calculate the week-over-week retention rate of Community Notes contributors.
#Retention
#SQL
#Cohort Analysis
Product Manager
•
System Design
•
medium
Design a rate-limiting system to prevent malicious bots from scraping X's API while allowing legitimate enterprise partners uninterrupted access.
#API
#Security
#Infrastructure
Product Manager
•
System Design
•
hard
Design a system to detect and filter out spam in X Direct Messages in real-time.
#Spam Detection
#Real-time
#Machine Learning
Product Manager
•
System Design
•
hard
Design a system to support X's trending topics. How do you ensure it is real-time, localized, and resistant to manipulation?
#Algorithms
#Real-time Systems
#Data Processing
Product Manager
•
System Design
•
hard
Design the backend for Community Notes to ensure real-time updates and consensus calculation across millions of users.
#Real-time
#Distributed Systems
#Algorithms
Product Manager
•
System Design
•
hard
Design the high-level architecture for X's 'For You' timeline recommendation engine.
#Machine Learning
#Recommendation Systems
#Scalability
Product Manager
•
System Design
•
hard
Design a system to handle viral spikes (e.g., Super Bowl, Election Night) to ensure X stays online and responsive.
#Scalability
#Load Balancing
#Infrastructure
Product Manager
•
System Design
•
hard
Design the backend architecture for X Spaces (live audio) to support 1 million concurrent listeners in a single room.
#Audio
#Scalability
#Real-time Systems
Product Manager
•
Technical
•
hard
How would you handle the product tradeoff between maximizing free speech and ensuring advertiser brand safety?
#Trade-offs
#Strategy
#Trust & Safety
Product Manager
•
Technical
•
medium
We want to increase long-form video consumption on X. What features would you build, and how would you measure success?
#Video
#Engagement
#Feature Development
Product Manager
•
Technical
•
medium
Evaluate the success of the Community Notes feature. What are the top 3 metrics you would look at?
#Trust & Safety
#Metrics
#Crowdsourcing
Product Manager
•
Technical
•
hard
Design a job search and recruiting feature (X Hiring) tailored specifically for the X platform.
#Market Expansion
#Product Sense
#B2B
Product Manager
•
Technical
•
hard
You run an A/B test for a new reply ranking algorithm. Engagement (replies/likes) goes up by 10%, but ad click-through rate (CTR) drops by 5%. Do you launch?
#Trade-offs
#A/B Testing
#Monetization
Product Manager
•
Technical
•
easy
How would you improve the Bookmarks feature on X to make it a core part of the daily user experience?
#User Experience
#Core Product
#Retention
Product Manager
•
Technical
•
hard
What do you believe is the biggest existential threat to X right now, and how would you counter it through product strategy?
#Competitive Analysis
#Vision
#Business Strategy
Product Manager
•
Technical
•
medium
How would you integrate Grok AI into the core X timeline experience to increase daily active user (DAU) engagement?
#AI
#Product Sense
#User Engagement
Product Manager
•
Technical
•
medium
Design an audio-first feature for X that is NOT live broadcasting (Spaces).
#Innovation
#Audio
#Asynchronous Communication
Product Manager
•
Technical
•
easy
What are the top 3 metrics you would track to evaluate the health of the X ad platform?
#Advertising
#Metrics
#Monetization
Product Manager
•
Technical
•
medium
How would you optimize the onboarding flow for new users to immediately understand X's value proposition?
#Growth
#User Acquisition
#UX
Product Manager
•
Technical
•
hard
Should X build a dating feature? Walk me through your strategic thinking.
#Product Sense
#Vision
#Market Expansion
Product Manager
•
Technical
•
medium
How would you design an analytics dashboard for X Creators? What are the most important data points to show?
#Analytics
#UX
#Creator Economy
Product Manager
•
Technical
•
medium
Pitch a new monetization feature for Creators on X that does not rely on ad-revenue sharing.
#Creator Economy
#Monetization
#Innovation
Product Manager
•
Technical
•
hard
X is transitioning into an 'Everything App'. Design a peer-to-peer payments feature integrated directly into the X platform.
#Fintech
#Product Sense
#Vision
Product Manager
•
Technical
•
medium
X Premium (formerly Twitter Blue) subscriptions have dropped by 15% week-over-week. Walk me through how you would investigate the root cause.
#Root Cause Analysis
#Metrics
#Monetization
Software Engineer
•
Behavioral
•
medium
Describe a situation where you strongly disagreed with a technical decision made by leadership. How did you handle it?
#Communication
#Conflict Resolution
#Ownership
Software Engineer
•
Behavioral
•
medium
Tell me about a time you had to ship a critical feature under an extremely tight deadline. How did you ensure quality?
#Delivery
#Prioritization
#Resilience
Software Engineer
•
Behavioral
•
hard
Describe a time you caused a production outage. What was the root cause, how did you fix it, and what systemic changes did you implement?
#Incident Management
#Accountability
#Post-mortems
Software Engineer
•
Behavioral
•
hard
Tell me about a time you had to dive into an unfamiliar, legacy codebase, understand it quickly, and optimize its performance.
#Problem Solving
#Optimization
#Adaptability
Software Engineer
•
Behavioral
•
medium
At X, we move incredibly fast and priorities shift. How do you manage your time when everything is labeled as a P0 (highest priority)?
#Time Management
#Agility
#Communication
Software Engineer
•
Coding
•
medium
Implement a thread-safe counter class for tracking tweet likes in a highly concurrent environment.
#Concurrency
#Multithreading
Software Engineer
•
Coding
•
medium
Implement a sliding window algorithm to detect if a user has posted more than N tweets in the last M seconds.
#Queue
#Sliding Window
Software Engineer
•
Coding
•
medium
Design an Autocomplete system for X handles. Implement `insert(handle)` and `search(prefix)`.
#Trie
#String
#Design
Software Engineer
•
Coding
•
easy
Given a tree representing a tweet thread (replies to replies), write a function to find the maximum depth of the thread.
#Tree
#DFS
#BFS
Software Engineer
•
Coding
•
easy
Given a string representing a tweet, calculate its length where URLs count as exactly 23 characters, regardless of their actual length.
#String
#Parsing
#Regex
Software Engineer
•
Coding
•
easy
You are given a list of user connections. Find the most influential user, defined as the user with the highest in-degree in the graph.
#Graph
#Hash Table
Software Engineer
•
Coding
•
medium
Given a string, write a parser or state machine to extract all valid @mentions and #hashtags without using built-in regex libraries.
#String
#State Machine
Software Engineer
•
Coding
•
medium
Implement an LRU Cache to store the most recently accessed tweets.
#Hash Table
#Doubly Linked List
#Design
Software Engineer
•
Coding
•
medium
Find the shortest path (degrees of separation) between two users in a massive directed graph of followers.
#Graph
#BFS
#Bidirectional Search
Software Engineer
•
Coding
•
hard
Given a stream of tweets, find the top K most frequent hashtags in the last 5 minutes.
#Sliding Window
#Heap
#Queue
Software Engineer
•
Coding
•
medium
Implement a Token Bucket rate limiter class with an `allow_request(user_id)` method.
#Concurrency
#Math
#Design
Software Engineer
•
Coding
•
hard
Given an array of k sorted arrays representing timelines from different users, merge them into a single sorted timeline.
#Heap
#Divide and Conquer
#Linked List
Software Engineer
•
Coding
•
medium
Design a simplified version of Twitter. Implement functions to post a tweet, get the 10 most recent tweets in a news feed, follow a user, and unfollow a user.
#Hash Table
#Heap
#Object-Oriented Design
Software Engineer
•
Coding
•
hard
Write a function to parse a massive log file of API requests and return the 99th percentile latency.
#Math
#Sorting
#Bucket Sort
Software Engineer
•
Coding
•
easy
Given an array of tweet engagement scores (positive and negative integers), find the contiguous subarray with the maximum sum.
#Array
#Dynamic Programming
Software Engineer
•
System Design
•
hard
Design the X 'For You' timeline, focusing on how to handle the fan-out problem for users with millions of followers.
#Scalability
#Caching
#Graph Processing
#Stream Processing
Software Engineer
•
System Design
•
medium
Design a distributed rate limiter for the X API to prevent abuse while allowing burst traffic for premium (X Premium) users.
#Distributed Systems
#API Design
#Concurrency
Software Engineer
•
System Design
•
hard
Design a push notification system that alerts millions of users within seconds when a highly followed account posts a new tweet.
#Pub/Sub
#WebSockets
#Mobile Push
Software Engineer
•
System Design
•
hard
Design X Search. How would you index tweets to allow full-text search within seconds of posting?
#Search Engines
#Inverted Index
#Real-time Indexing
Software Engineer
•
System Design
•
medium
Design the Community Notes feature, including the data model for contributors, ratings, and the algorithm pipeline to display the most helpful note.
#Data Modeling
#Graph Algorithms
#Event Driven
Software Engineer
•
System Design
•
hard
Design an Ad Click Aggregation system that processes billions of events per day and provides real-time analytics to advertisers.
#Big Data
#OLAP
#Exactly-once Semantics
Software Engineer
•
System Design
•
hard
Design a system to detect and mitigate bot swarms liking a specific tweet in real-time.
#Machine Learning Infrastructure
#Anomaly Detection
#Stream Processing
Software Engineer
•
System Design
•
hard
Design the Trending Topics system. How do you process millions of tweets per minute to find top hashtags in real-time?
#Stream Processing
#Heavy Hitters
#Data Pipelines
Software Engineer
•
System Design
•
medium
Design Snowflake: A distributed unique ID generator for tweets that is highly available and sortable by time.
#Distributed Systems
#Bit Manipulation
#High Availability
Software Engineer
•
System Design
•
hard
Design a View Count system for tweets that updates in near real-time and handles viral spikes without overwhelming the database.
#Event Aggregation
#Caching
#Database Sharding
Software Engineer
•
Technical
•
hard
How would you profile and reduce the memory footprint of a high-throughput Go or Rust microservice handling tweet ingestion?
#Profiling
#Memory Management
#Go/Rust
Software Engineer
•
Technical
•
easy
Describe the differences between TCP and UDP. Why might X use UDP for its Spaces live audio feature?
#Protocols
#Networking
#Streaming
Software Engineer
•
Technical
•
medium
Explain how a reverse proxy works. How does it help in load balancing and securing X's API traffic?
#Load Balancing
#Security
#Architecture
Software Engineer
•
Technical
•
medium
Explain how you would optimize a slow-loading React component on the X web client that renders a timeline of rich media tweets.
#React
#Performance
#Virtualization
Software Engineer
•
Technical
•
medium
How does Redis handle memory eviction? Which eviction policy would you configure for a tweet cache and why?
#Redis
#Caching
#Memory Management
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.