Twitter logo TW
Verified Company Vault

Twitter DSA Interview Questions

51 curated coding interview questions directly asked in Twitter technical rounds, sorted by frequency with recency and difficulty diagnostics.

51 Total Questions
8 (16%) Easy Problems
31 (61%) Medium Problems
12 (24%) Hard Problems
🔥 Most Tested Topics:
Core DSA (22)Strings (8)Arrays (7)Design (5)Linked List (4)
📂 Sourced Datasets:
All questionsOlder than 6 months
Showing 51 of 51 displayed
IDProblemDifficultyTopicPatternAcceptanceFrequencyRecency
10Regular Expression MatchingHardCore DSAImplementation / Reasoning31.0%100.0%all
12Integer to RomanMediumStringsHashing / Sliding Window71.0%100.0%all
20Valid ParenthesesEasyStringsHashing / Sliding Window44.2%100.0%all
23Merge k Sorted ListsHardArrays; Linked List; HeapSorting / Prefix / Scan; Two Pointers; Priority Queue59.6%100.0%all
42Trapping Rain WaterHardCore DSATwo Pointers67.4%100.0%all
43Multiply StringsMediumStringsHashing / Sliding Window44.2%100.0%all
44Wildcard MatchingHardCore DSAImplementation / Reasoning32.0%100.0%all
56Merge IntervalsMediumArraysSorting / Prefix / Scan51.8%100.0%all
60Permutation SequenceHardBacktrackingBacktracking53.1%100.0%all
118Pascal's TriangleEasyCore DSAImplementation / Reasoning78.9%100.0%all
140Word Break IIHardStrings; Dynamic ProgrammingHashing / Sliding Window; State Transition55.6%100.0%all
146LRU CacheMediumDesignData Structure Design47.4%100.0%all
2073Time Needed to Buy TicketsEasyCore DSAImplementation / Reasoning72.6%100.0%all
149Max Points on a LineHardCore DSAImplementation / Reasoning30.7%100.0%all
161One Edit DistanceMediumDynamic ProgrammingState Transition34.6%100.0%all
202Happy NumberEasyCore DSAImplementation / Reasoning59.7%100.0%all
206Reverse Linked ListEasyLinked ListTwo Pointers80.6%100.0%all
208Implement Trie (Prefix Tree)MediumTreesDFS / BFS69.5%100.0%all
218The Skyline ProblemHardCore DSAImplementation / Reasoning45.4%100.0%all
235Lowest Common Ancestor of a Binary Search TreeMediumTrees; Binary SearchDFS / BFS; Binary Search70.6%100.0%all
251Flatten 2D VectorMediumCore DSAImplementation / Reasoning50.5%100.0%all
269Alien DictionaryHardGraphsBFS / DFS / Topological Sort37.2%100.0%all
296Best Meeting PointHardGreedyGreedy61.4%100.0%all
1206Design SkiplistHardLinked List; DesignTwo Pointers; Data Structure Design59.7%100.0%all
323Number of Connected Components in an Undirected GraphMediumGraphsBFS / DFS / Topological Sort65.0%100.0%all
341Flatten Nested List IteratorMediumLinked List; DesignTwo Pointers; Data Structure Design65.7%100.0%all
355Design TwitterMediumDesignData Structure Design44.7%100.0%all
378Kth Smallest Element in a Sorted MatrixMediumArrays; HeapSorting / Prefix / Scan; Priority Queue64.6%100.0%all
380Insert Delete GetRandom O(1)MediumCore DSAImplementation / Reasoning55.4%100.0%all
407Trapping Rain Water IIHardCore DSATwo Pointers64.1%100.0%all
433Minimum Genetic MutationMediumArraysSorting / Prefix / Scan56.6%100.0%all
1347Minimum Number of Steps to Make Two Strings AnagramMediumArrays; StringsSorting / Prefix / Scan; Hashing / Sliding Window82.5%100.0%all
1348Tweet Counts Per FrequencyMediumCore DSAImplementation / Reasoning46.1%100.0%all
468Validate IP AddressMediumStringsHashing / Sliding Window28.3%100.0%all
580Count Student Number in DepartmentsMediumCore DSAImplementation / Reasoning60.0%100.0%all
1459Rectangles AreaMediumCore DSAImplementation / Reasoning68.8%100.0%all
585Investments in 2016MediumCore DSAImplementation / Reasoning51.1%100.0%all
586Customer Placing the Largest Number of OrdersEasyCore DSAImplementation / Reasoning64.4%100.0%all
608Tree NodeMediumTreesDFS / BFS75.7%100.0%all
1683Invalid TweetsEasyStringsHashing / Sliding Window85.1%100.0%all
2768Number of Black BlocksMediumCore DSAImplementation / Reasoning41.8%100.0%all
831Masking Personal InformationMediumCore DSAImplementation / Reasoning55.2%100.0%all
1797Design Authentication ManagerMediumDesignData Structure Design58.6%100.0%all
1785Minimum Elements to Add to Form a Given SumMediumArraysSorting / Prefix / Scan45.2%100.0%all
868Binary GapEasyCore DSAImplementation / Reasoning74.3%100.0%all
1817Finding the Users Active MinutesMediumCore DSAImplementation / Reasoning80.8%100.0%all
1882Process Tasks Using ServersMediumCore DSAImplementation / Reasoning41.9%100.0%all
1910Remove All Occurrences of a SubstringMediumStrings; TreesHashing / Sliding Window; DFS / BFS78.5%100.0%all
1905Count Sub IslandsMediumGraphsBFS / DFS / Topological Sort73.0%100.0%all
764Largest Plus SignMediumCore DSAImplementation / Reasoning49.2%62.5%all
1167Minimum Cost to Connect SticksMediumArraysSorting / Prefix / Scan71.9%50.0%all