X (Twitter) interview questions
Software engineer
Coding
- Number of Provinces (LeetCode 547)
- Longest Substring with At Most K Distinct Characters (LeetCode 340)
- Minimum Genetic Mutation (LeetCode 433)
- Flatten Nested List Iterator (LeetCode 341)
- Best Meeting Point (LeetCode 296)
- Alien Dictionary (LeetCode 269)
- Insert Delete GetRandom O(1) (LeetCode 380)
- Product of Array Except Self (LeetCode 238)
- Convert Sorted List to BST (LeetCode 109)
- Middle of the Linked List (LeetCode 876)
- Binary Tree Preorder Traversal (LeetCode 144)
- Largest plus sign in a grid of mines
- Tweet counts per time frequency
- Find the users' active minutes
- Count occurrences of a number in a sorted array
- Insert an element in the middle of a linked list
- Find the longest palindrome in a string
- Find all pairs in an array that sum to a given number
- Build a list of (number, cube) tuples from a list of numbers
System design
- Design the Twitter home timeline: scale, storage, caching and real-time delivery
- Design a chat application like WhatsApp or Messenger
- Design a recommendation system that works without a search query
- Design the backend for Uber
- Design a service that returns all restaurants within 2 km of a user
- Design a system to collect data from IoT devices
- Design a payment system
- Design a movie ticket reservation system
- Keep a live top-ten list across distributed servers: data structures and caching
- Process messages from many producer threads in timestamp order
- Design a billing system for a cloud platform
- Design a hotel-rate aggregator that pulls current prices from many sites
What X (Twitter) looks for
- Extremely hardcore — After the 2022 acquisition, staff were asked to commit to long hours at high intensity, so expect questions about how you work under pressure.
- Exceptional performance — The same message set exceptional performance as the passing bar, so bring stories with clear, measurable results you drove.
Behavioral questions
- Why Twitter?
- Why do you want to pursue a career in software engineering?
- Where do you see yourself in ten years?
- Do you like working on a team?
- How do you set goals for yourself?
- How do you handle pressure at work?
- Describe a time you managed a challenging project under a tight deadline.
- Tell me about a project where you brought in a new technology or framework.
- Tell me about a conflict within your development team and how you handled it.
- Describe a time you optimized a feature for scale on a tight deadline.
- Tell me about a challenging bug you resolved.
- How would you ship a new feature that could hurt the user experience?
- Tell me about a project of yours in depth, including a failure along the way.
The loop
- Recruiter screen: A short call on your resume, your motivation and why you want to work there.
- Online assessment (some candidates): Some candidates, especially new grads, first take a timed test of a few data structures and algorithms problems.
- Technical screen: About an hour with an engineer or the hiring manager: coding in a shared editor, sometimes with design questions and a discussion of your projects.
- Onsite: coding: Coding rounds of about an hour, each with one or more algorithm problems.
- Onsite: system design: An hour on designing a scalable back end, covering architecture, data, interfaces and scaling; a Twitter-style timeline is a common prompt.
- Onsite: behavioral: Situational questions on motivation, teamwork, pressure and leadership, often with the hiring manager.
- Team matching and offer: Some candidates meet teams or senior leaders before the offer is negotiated.
Tips
- Think out loud and ask clarifying questions before you code; do not rush to an answer.
- Practice graph traversal, trees, two pointers and dynamic programming, and also stack problems such as balanced brackets and expression evaluation.
- Be ready to discuss your own projects in depth during the technical rounds.
- Prepare one clear story each for ownership, conflict and a failure, and answer honestly with real examples.
- Know how a Twitter-style timeline is built, from fan-out to caching, before the design round.
Sources
- Twitter Software Engineer Interview — Prepfully
- Twitter Interview Questions: What to Expect and How to Prepare — AlgoMonster
- Design Twitter Timeline — Codemia
- Elon Musk sends middle-of-the-night email demanding 'extremely hardcore' work culture at Twitter — Fortune (via Yahoo Finance)
- Twitter (X) Interview Experience — PlacementPapers
Other companies
- Amazon
- Meta
- Microsoft
- Apple
- Netflix
- NVIDIA
- OpenAI
- Anthropic
- Databricks
- Snowflake
- Palantir
- Datadog
- Uber
- Airbnb
- DoorDash
- Lyft
- Spotify
- Snap
- TikTok
- Roblox
- Stripe
- Coinbase
- Robinhood
- PayPal
- Block
- Visa
- Bloomberg
- Salesforce
- Oracle
- Adobe
- Atlassian
- Shopify
- ServiceNow
- Workday
- Dropbox
- Cloudflare
- IBM
- Cisco
- Intel
- Qualcomm
- Tesla
- Goldman Sachs
- JPMorgan Chase
- Capital One
- Walmart
Start free on Cariara · Coding problems · System design studio