X (Twitter) interview questions

Software engineer

Coding

  1. Number of Provinces (LeetCode 547)
  2. Longest Substring with At Most K Distinct Characters (LeetCode 340)
  3. Minimum Genetic Mutation (LeetCode 433)
  4. Flatten Nested List Iterator (LeetCode 341)
  5. Best Meeting Point (LeetCode 296)
  6. Alien Dictionary (LeetCode 269)
  7. Insert Delete GetRandom O(1) (LeetCode 380)
  8. Product of Array Except Self (LeetCode 238)
  9. Convert Sorted List to BST (LeetCode 109)
  10. Middle of the Linked List (LeetCode 876)
  11. Binary Tree Preorder Traversal (LeetCode 144)
  12. Largest plus sign in a grid of mines
  13. Tweet counts per time frequency
  14. Find the users' active minutes
  15. Count occurrences of a number in a sorted array
  16. Insert an element in the middle of a linked list
  17. Find the longest palindrome in a string
  18. Find all pairs in an array that sum to a given number
  19. Build a list of (number, cube) tuples from a list of numbers

System design

  1. Design the Twitter home timeline: scale, storage, caching and real-time delivery
  2. Design a chat application like WhatsApp or Messenger
  3. Design a recommendation system that works without a search query
  4. Design the backend for Uber
  5. Design a service that returns all restaurants within 2 km of a user
  6. Design a system to collect data from IoT devices
  7. Design a payment system
  8. Design a movie ticket reservation system
  9. Keep a live top-ten list across distributed servers: data structures and caching
  10. Process messages from many producer threads in timestamp order
  11. Design a billing system for a cloud platform
  12. 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

  1. Why Twitter?
  2. Why do you want to pursue a career in software engineering?
  3. Where do you see yourself in ten years?
  4. Do you like working on a team?
  5. How do you set goals for yourself?
  6. How do you handle pressure at work?
  7. Describe a time you managed a challenging project under a tight deadline.
  8. Tell me about a project where you brought in a new technology or framework.
  9. Tell me about a conflict within your development team and how you handled it.
  10. Describe a time you optimized a feature for scale on a tight deadline.
  11. Tell me about a challenging bug you resolved.
  12. How would you ship a new feature that could hurt the user experience?
  13. Tell me about a project of yours in depth, including a failure along the way.

The loop

  1. Recruiter screen: A short call on your resume, your motivation and why you want to work there.
  2. Online assessment (some candidates): Some candidates, especially new grads, first take a timed test of a few data structures and algorithms problems.
  3. 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.
  4. Onsite: coding: Coding rounds of about an hour, each with one or more algorithm problems.
  5. 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.
  6. Onsite: behavioral: Situational questions on motivation, teamwork, pressure and leadership, often with the hiring manager.
  7. 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

  1. Twitter Software Engineer Interview — Prepfully
  2. Twitter Interview Questions: What to Expect and How to Prepare — AlgoMonster
  3. Design Twitter Timeline — Codemia
  4. Elon Musk sends middle-of-the-night email demanding 'extremely hardcore' work culture at Twitter — Fortune (via Yahoo Finance)
  5. Twitter (X) Interview Experience — PlacementPapers

Other companies

Start free on Cariara · Coding problems · System design studio