X coding interview
questions, leaked.
52 problems reported across recent X interviews. Top patterns: array, hash table, string. The list below is what most reported candidates actually saw, plus the honest play if you can't grind all of it.
X's interview asks 52 questions across a ruthless distribution: 32 medium, 12 hard, only 8 easy. You won't have time to drill everything. Arrays dominate the data (21 problems), followed by hash tables and strings (14 each). Design patterns show up constantly. The median problem here requires multiple techniques stacked together. Trapping Rain Water, LRU Cache, The Skyline Problem, these aren't warm-ups. If you hit a pattern you haven't seen in the live assessment, StealthCoder runs invisibly behind the proctor's view and surfaces a working solution in seconds, so you can paste and move on.
Top problems at X
| # | Problem | Diff | Frequency | Pass % | Patterns |
|---|---|---|---|---|---|
| 01 | Insert Delete GetRandom O(1) | MEDIUM | 100.0 | 55% | Array · Hash Table · Math |
| 02 | Trapping Rain Water | HARD | 96.3 | 65% | Array · Two Pointers · Dynamic Programming |
| 03 | Flatten Nested List Iterator | MEDIUM | 96.3 | 65% | Stack · Tree · Depth-First Search |
| 04 | Implement Trie (Prefix Tree) | MEDIUM | 94.2 | 68% | Hash Table · String · Design |
| 05 | Design Twitter | MEDIUM | 94.2 | 43% | Hash Table · Linked List · Design |
| 06 | Merge Intervals | MEDIUM | 94.2 | 49% | Array · Sorting |
| 07 | Tweet Counts Per Frequency | MEDIUM | 94.2 | 45% | Hash Table · Binary Search · Design |
| 08 | Investments in 2016 | MEDIUM | 91.9 | 50% | Database |
| 09 | Best Meeting Point | HARD | 91.9 | 61% | Array · Math · Sorting |
| 10 | LRU Cache | MEDIUM | 91.9 | 45% | Hash Table · Linked List · Design |
| 11 | The Skyline Problem | HARD | 89.4 | 44% | Array · Divide and Conquer · Binary Indexed Tree |
| 12 | Rectangles Area | MEDIUM | 89.4 | 69% | Database |
| 13 | Happy Number | EASY | 89.4 | 58% | Hash Table · Math · Two Pointers |
| 14 | Customer Placing the Largest Number of Orders | EASY | 89.4 | 64% | Database |
| 15 | Number of Black Blocks | MEDIUM | 89.4 | 39% | Array · Hash Table · Enumeration |
| 16 | Reverse Linked List | EASY | 89.4 | 79% | Linked List · Recursion |
| 17 | Validate IP Address | MEDIUM | 89.4 | 28% | String |
| 18 | Tree Node | MEDIUM | 89.4 | 74% | Database |
| 19 | Masking Personal Information | MEDIUM | 89.4 | 51% | String |
| 20 | Process Tasks Using Servers | MEDIUM | 89.4 | 41% | Array · Heap (Priority Queue) |
| 21 | Number of Connected Components in an Undirected Graph | MEDIUM | 89.4 | 64% | Depth-First Search · Breadth-First Search · Union Find |
| 22 | Remove All Occurrences of a Substring | MEDIUM | 89.4 | 78% | String · Stack · Simulation |
| 23 | Lowest Common Ancestor of a Binary Search Tree | MEDIUM | 89.4 | 68% | Tree · Depth-First Search · Binary Search Tree |
| 24 | Design Authentication Manager | MEDIUM | 89.4 | 58% | Hash Table · Linked List · Design |
| 25 | Count Sub Islands | MEDIUM | 89.4 | 73% | Array · Depth-First Search · Breadth-First Search |
| 26 | Pascal's Triangle | EASY | 89.4 | 77% | Array · Dynamic Programming |
| 27 | Minimum Elements to Add to Form a Given Sum | MEDIUM | 89.4 | 44% | Array · Greedy |
| 28 | Kth Smallest Element in a Sorted Matrix | MEDIUM | 89.4 | 64% | Array · Binary Search · Sorting |
| 29 | Count Student Number in Departments | MEDIUM | 89.4 | 60% | Database |
| 30 | Minimum Genetic Mutation | MEDIUM | 89.4 | 55% | Hash Table · String · Breadth-First Search |
| 31 | Minimum Number of Steps to Make Two Strings Anagram | MEDIUM | 89.4 | 82% | Hash Table · String · Counting |
| 32 | Permutation Sequence | HARD | 89.4 | 50% | Math · Recursion |
| 33 | Binary Gap | EASY | 89.4 | 65% | Bit Manipulation |
| 34 | Regular Expression Matching | HARD | 89.4 | 29% | String · Dynamic Programming · Recursion |
| 35 | Integer to Roman | MEDIUM | 89.4 | 69% | Hash Table · Math · String |
| 36 | Word Break II | HARD | 89.4 | 54% | Array · Hash Table · String |
| 37 | Alien Dictionary | HARD | 89.4 | 37% | Array · String · Depth-First Search |
| 38 | Time Needed to Buy Tickets | EASY | 89.4 | 71% | Array · Queue · Simulation |
| 39 | Valid Parentheses | EASY | 89.4 | 42% | String · Stack |
| 40 | Max Points on a Line | HARD | 89.4 | 29% | Array · Hash Table · Math |
| 41 | Merge k Sorted Lists | HARD | 89.4 | 57% | Linked List · Divide and Conquer · Heap (Priority Queue) |
| 42 | Trapping Rain Water II | HARD | 89.4 | 59% | Array · Breadth-First Search · Heap (Priority Queue) |
| 43 | Finding the Users Active Minutes | MEDIUM | 89.4 | 80% | Array · Hash Table |
| 44 | One Edit Distance | MEDIUM | 89.4 | 34% | Two Pointers · String |
| 45 | Invalid Tweets | EASY | 89.4 | 86% | Database |
| 46 | Multiply Strings | MEDIUM | 89.4 | 42% | Math · String · Simulation |
| 47 | Wildcard Matching | HARD | 89.4 | 30% | String · Dynamic Programming · Greedy |
| 48 | Design Skiplist | HARD | 89.4 | 58% | Linked List · Design |
| 49 | Flatten 2D Vector | MEDIUM | 89.4 | 50% | Array · Two Pointers · Design |
| 50 | Random Pick with Weight | MEDIUM | 47.6 | 48% | Array · Math · Binary Search |
Frequencies derived from public community-tagged interview reports. Click a row to view on LeetCode.
You have a week, maybe less. You can't out-grind the list above. StealthCoder runs invisibly during the actual X OA. The proctor cannot see it. Screen share cannot detect it. Made by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know.
Get StealthCoder- array21 · 40%
- hash table14 · 27%
- string14 · 27%
- design9 · 17%
- math8 · 15%
- breadth first search7 · 13%
- depth first search6 · 12%
- linked list6 · 12%
- heap priority queue6 · 12%
- database6 · 12%
The difficulty curve is steep: 62% medium and hard combined means you'll face algorithmic problems that require calm hands. Arrays are your foundation (21 problems), but don't skip hash tables and strings (14 each). Design questions like LRU Cache and Design Twitter test whether you can build systems under pressure, not just solve puzzles. BFS, DFS, and heap problems appear frequently enough that stumbling on one costs you. Math and database show up in roughly 15% of the pool, so they're not primary, but they're often paired with arrays. The real threat isn't missing one topic, it's failing a combo problem where array logic meets hash table tricks. That's where StealthCoder becomes your insurance: if a problem requires two techniques and your mind blanks on the second, you've got a working solution on screen in real time.
Companies with similar patterns
If you prepped for X, these companies recycle ~60% of the same topics.
You've seen the list.
Now make sure you pass X.
Memorizing every problem above in a week is a fantasy. StealthCoder is the hedge: an AI overlay that's invisible during screen share. It reads the problem on screen and surfaces a working solution in under 2 seconds. Made by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know. Works on HackerRank, CodeSignal, CoderPad, and Karat.
X interview FAQ
How many array problems should I solve before the OA?+
Array problems are 40% of the reported pool (21 of 52). Plan to solve at least 15-20 before test day, mixing easy and medium. Trapping Rain Water and Merge Intervals represent the harder end. You'll see arrays paired with sorting, two pointers, and hash tables, so don't isolate them.
Is design a big part of X's interview?+
Yes. Nine problems across the data touch design concepts (LRU Cache, Design Twitter, Insert Delete GetRandom O(1)). All are medium difficulty. Design questions test your ability to combine hash tables, linked lists, and heaps under time pressure. Start with LRU Cache if you're weak here.
Should I study database questions?+
Database appears in six problems (about 11% of the pool). They're usually easy to medium. If SQL isn't your strength, study them last. They won't break your interview, but skipping them means leaving easy points on the table. Investments in 2016 is a common report-building problem.
What's the biggest trap in X's problem set?+
Combo problems. The Skyline Problem chains arrays, heaps, and line sweep together. Trapping Rain Water requires dynamic programming and two pointers in one shot. You can't solve these by drilling only arrays or only DP. Practice 5-6 multi-technique medium problems per week leading up to test day.
How much time should I spend on hard problems?+
Hard problems make up 23% of the pool (12 of 52). They're worth attempting, but don't sacrifice medium-problem fluency for them. Trapping Rain Water, Best Meeting Point, and The Skyline Problem are the hardest. Drill 3-4 hards in the week before your OA to stay sharp.