# Twitter Coding Interview Questions

> 53 DSA problems asked in Twitter coding interviews and online assessments, sorted easiest first with hints. Free practice for placements on InternHack.

Canonical: https://www.internhack.in/learn/dsa/companies/twitter
Last updated: 2026-11-28

53 DSA problems tagged as asked in Twitter coding interviews and online assessments. Below are all 53: 8 easy, 33 medium and 12 hard. Start with the easy ones, then move to medium. Practise free on InternHack and track your progress.

## Twitter DSA problems, easiest first

1. [Binary Gap](https://www.internhack.in/learn/dsa/problem/binary-gap) (Easy)
2. [Customer Placing the Largest Number of Orders](https://www.internhack.in/learn/dsa/problem/customer-placing-the-largest-number-of-orders) (Easy)
3. [Happy Number](https://www.internhack.in/learn/dsa/problem/happy-number) (Easy)
4. [Invalid Tweets](https://www.internhack.in/learn/dsa/problem/invalid-tweets) (Easy)
5. [Pascal's Triangle](https://www.internhack.in/learn/dsa/problem/pascals-triangle) (Easy)
6. [Reverse Linked List](https://www.internhack.in/learn/dsa/problem/reverse-linked-list) (Easy)
7. [Time Needed to Buy Tickets](https://www.internhack.in/learn/dsa/problem/time-needed-to-buy-tickets) (Easy)
8. [Valid Parentheses](https://www.internhack.in/learn/dsa/problem/valid-parentheses) (Easy)
9. [Count Student Number in Departments](https://www.internhack.in/learn/dsa/problem/count-student-number-in-departments) (Medium)
10. [Count Sub Islands](https://www.internhack.in/learn/dsa/problem/count-sub-islands) (Medium)
11. [Design Authentication Manager](https://www.internhack.in/learn/dsa/problem/design-authentication-manager) (Medium)
12. [Design Twitter](https://www.internhack.in/learn/dsa/problem/design-twitter) (Medium)
13. [Finding the Users Active Minutes](https://www.internhack.in/learn/dsa/problem/finding-the-users-active-minutes) (Medium)
14. [Flatten 2D Vector](https://www.internhack.in/learn/dsa/problem/flatten-2d-vector) (Medium)
15. [Flatten Nested List Iterator](https://www.internhack.in/learn/dsa/problem/flatten-nested-list-iterator) (Medium)
16. [Implement Trie (Prefix Tree)](https://www.internhack.in/learn/dsa/problem/implement-trie-prefix-tree) (Medium)
17. [Insert Delete GetRandom O(1)](https://www.internhack.in/learn/dsa/problem/insert-delete-getrandom-o1) (Medium)
18. [Integer to Roman](https://www.internhack.in/learn/dsa/problem/integer-to-roman) (Medium)
19. [Investments in 2016](https://www.internhack.in/learn/dsa/problem/investments-in-2016) (Medium)
20. [Kth Smallest Element in a Sorted Matrix](https://www.internhack.in/learn/dsa/problem/kth-smallest-element-in-a-sorted-matrix) (Medium)
21. [Largest Plus Sign](https://www.internhack.in/learn/dsa/problem/largest-plus-sign) (Medium)
22. [Lowest Common Ancestor of a Binary Search Tree](https://www.internhack.in/learn/dsa/problem/lowest-common-ancestor-of-a-binary-search-tree) (Medium)
23. [LRU Cache](https://www.internhack.in/learn/dsa/problem/lru-cache) (Medium)
24. [Masking Personal Information](https://www.internhack.in/learn/dsa/problem/masking-personal-information) (Medium)
25. [Merge Intervals](https://www.internhack.in/learn/dsa/problem/merge-intervals) (Medium)
26. [Minimum Cost to Connect Sticks](https://www.internhack.in/learn/dsa/problem/minimum-cost-to-connect-sticks) (Medium)
27. [Minimum Elements to Add to Form a Given Sum](https://www.internhack.in/learn/dsa/problem/minimum-elements-to-add-to-form-a-given-sum) (Medium)
28. [Minimum Genetic Mutation](https://www.internhack.in/learn/dsa/problem/minimum-genetic-mutation) (Medium)
29. [Minimum Number of Steps to Make Two Strings Anagram](https://www.internhack.in/learn/dsa/problem/minimum-number-of-steps-to-make-two-strings-anagram) (Medium)
30. [Multiply Strings](https://www.internhack.in/learn/dsa/problem/multiply-strings) (Medium)
31. [Number of Black Blocks](https://www.internhack.in/learn/dsa/problem/number-of-black-blocks) (Medium)
32. [Number of Connected Components in an Undirected Graph](https://www.internhack.in/learn/dsa/problem/number-of-connected-components-in-an-undirected-graph) (Medium)
33. [One Edit Distance](https://www.internhack.in/learn/dsa/problem/one-edit-distance) (Medium)
34. [Process Tasks Using Servers](https://www.internhack.in/learn/dsa/problem/process-tasks-using-servers) (Medium)
35. [Random Pick with Weight](https://www.internhack.in/learn/dsa/problem/random-pick-with-weight) (Medium)
36. [Rectangles Area](https://www.internhack.in/learn/dsa/problem/rectangles-area) (Medium)
37. [Remove All Occurrences of a Substring](https://www.internhack.in/learn/dsa/problem/remove-all-occurrences-of-a-substring) (Medium)
38. [Rotting Oranges](https://www.internhack.in/learn/dsa/problem/rotting-oranges) (Medium)
39. [Tree Node](https://www.internhack.in/learn/dsa/problem/tree-node) (Medium)
40. [Tweet Counts Per Frequency](https://www.internhack.in/learn/dsa/problem/tweet-counts-per-frequency) (Medium)
41. [Validate IP Address](https://www.internhack.in/learn/dsa/problem/validate-ip-address) (Medium)
42. [Alien Dictionary](https://www.internhack.in/learn/dsa/problem/alien-dictionary) (Hard)
43. [Best Meeting Point](https://www.internhack.in/learn/dsa/problem/best-meeting-point) (Hard)
44. [Design Skiplist](https://www.internhack.in/learn/dsa/problem/design-skiplist) (Hard)
45. [Max Points on a Line](https://www.internhack.in/learn/dsa/problem/max-points-on-a-line) (Hard)
46. [Merge k Sorted Lists](https://www.internhack.in/learn/dsa/problem/merge-k-sorted-lists) (Hard)
47. [Permutation Sequence](https://www.internhack.in/learn/dsa/problem/permutation-sequence) (Hard)
48. [Regular Expression Matching](https://www.internhack.in/learn/dsa/problem/regular-expression-matching) (Hard)
49. [The Skyline Problem](https://www.internhack.in/learn/dsa/problem/the-skyline-problem) (Hard)
50. [Trapping Rain Water](https://www.internhack.in/learn/dsa/problem/trapping-rain-water) (Hard)
51. [Trapping Rain Water II](https://www.internhack.in/learn/dsa/problem/trapping-rain-water-ii) (Hard)
52. [Wildcard Matching](https://www.internhack.in/learn/dsa/problem/wildcard-matching) (Hard)
53. [Word Break II](https://www.internhack.in/learn/dsa/problem/word-break-ii) (Hard)

## Prepare for the rest of the Twitter process

- [Aptitude questions by company](https://www.internhack.in/learn/aptitude/companies)
- [Technical interview questions](https://www.internhack.in/learn/interview)
- [Free ATS resume check](https://www.internhack.in/ats-score/try), no signup

## Other companies

- [Google](https://www.internhack.in/learn/dsa/companies/google) (2217)
- [Amazon](https://www.internhack.in/learn/dsa/companies/amazon) (1938)
- [Meta](https://www.internhack.in/learn/dsa/companies/meta) (1387)
- [Microsoft](https://www.internhack.in/learn/dsa/companies/microsoft) (1352)
- [Bloomberg](https://www.internhack.in/learn/dsa/companies/bloomberg) (1173)
- [Tiktok](https://www.internhack.in/learn/dsa/companies/tiktok) (383)
- [Uber](https://www.internhack.in/learn/dsa/companies/uber) (381)
- [Apple](https://www.internhack.in/learn/dsa/companies/apple) (356)
- [Oracle](https://www.internhack.in/learn/dsa/companies/oracle) (340)
- [Goldman Sachs](https://www.internhack.in/learn/dsa/companies/goldman-sachs) (270)
- [Adobe](https://www.internhack.in/learn/dsa/companies/adobe) (227)
- [TCS](https://www.internhack.in/learn/dsa/companies/tcs) (217)
- [Salesforce](https://www.internhack.in/learn/dsa/companies/salesforce) (189)
- [Linkedin](https://www.internhack.in/learn/dsa/companies/linkedin) (180)
- [Zoho](https://www.internhack.in/learn/dsa/companies/zoho) (179)
- [IBM](https://www.internhack.in/learn/dsa/companies/ibm) (170)
- [Infosys](https://www.internhack.in/learn/dsa/companies/infosys) (158)
- [Walmart Labs](https://www.internhack.in/learn/dsa/companies/walmart-labs) (152)
- [Accenture](https://www.internhack.in/learn/dsa/companies/accenture) (144)
- [Nvidia](https://www.internhack.in/learn/dsa/companies/nvidia) (137)
- [Yandex](https://www.internhack.in/learn/dsa/companies/yandex) (134)
- [DE Shaw](https://www.internhack.in/learn/dsa/companies/de-shaw) (124)
- [Visa](https://www.internhack.in/learn/dsa/companies/visa) (124)
- [Flipkart](https://www.internhack.in/learn/dsa/companies/flipkart) (117)

## Related

- [Home](https://www.internhack.in/)
- [Learn](https://www.internhack.in/learn)
- [DSA by company](https://www.internhack.in/learn/dsa/companies)
