Twitter Coding Interview Questions

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 (Easy)
  2. Customer Placing the Largest Number of Orders (Easy)
  3. Happy Number (Easy)
  4. Invalid Tweets (Easy)
  5. Pascal's Triangle (Easy)
  6. Reverse Linked List (Easy)
  7. Time Needed to Buy Tickets (Easy)
  8. Valid Parentheses (Easy)
  9. Count Student Number in Departments (Medium)
  10. Count Sub Islands (Medium)
  11. Design Authentication Manager (Medium)
  12. Design Twitter (Medium)
  13. Finding the Users Active Minutes (Medium)
  14. Flatten 2D Vector (Medium)
  15. Flatten Nested List Iterator (Medium)
  16. Implement Trie (Prefix Tree) (Medium)
  17. Insert Delete GetRandom O(1) (Medium)
  18. Integer to Roman (Medium)
  19. Investments in 2016 (Medium)
  20. Kth Smallest Element in a Sorted Matrix (Medium)
  21. Largest Plus Sign (Medium)
  22. Lowest Common Ancestor of a Binary Search Tree (Medium)
  23. LRU Cache (Medium)
  24. Masking Personal Information (Medium)
  25. Merge Intervals (Medium)
  26. Minimum Cost to Connect Sticks (Medium)
  27. Minimum Elements to Add to Form a Given Sum (Medium)
  28. Minimum Genetic Mutation (Medium)
  29. Minimum Number of Steps to Make Two Strings Anagram (Medium)
  30. Multiply Strings (Medium)
  31. Number of Black Blocks (Medium)
  32. Number of Connected Components in an Undirected Graph (Medium)
  33. One Edit Distance (Medium)
  34. Process Tasks Using Servers (Medium)
  35. Random Pick with Weight (Medium)
  36. Rectangles Area (Medium)
  37. Remove All Occurrences of a Substring (Medium)
  38. Rotting Oranges (Medium)
  39. Tree Node (Medium)
  40. Tweet Counts Per Frequency (Medium)
  41. Validate IP Address (Medium)
  42. Alien Dictionary (Hard)
  43. Best Meeting Point (Hard)
  44. Design Skiplist (Hard)
  45. Max Points on a Line (Hard)
  46. Merge k Sorted Lists (Hard)
  47. Permutation Sequence (Hard)
  48. Regular Expression Matching (Hard)
  49. The Skyline Problem (Hard)
  50. Trapping Rain Water (Hard)
  51. Trapping Rain Water II (Hard)
  52. Wildcard Matching (Hard)
  53. Word Break II (Hard)

Prepare for the rest of the Twitter process

Other companies