Coding interview problems
3,736 problems: 937 Easy, 1,914 Medium, 885 Hard. Each runs against hidden tests, in 13 languages; database problems in SQL. Free for members.
Solve them in the app Explore guides
Problems 1–100 of 3,736
- 1. Merge Strings Alternately Easy · String, Two Pointers · 0% accepted
- 2. Merge Sorted Array Easy · Array, Two Pointers, Sorting · Asked at Meta, Microsoft, Amazon
- 3. Majority Element Easy · Array, Hash Table, Counting · Asked at Amazon, Google, Microsoft
- 4. Longest Common Prefix Easy · String · Asked at Amazon, Google, Meta
- 5. Can Place Flowers Easy · Array, Greedy · Asked at Google, LinkedIn
- 6. Rotate Array Medium · Array, Math, Two Pointers · Asked at Microsoft, Amazon
- 7. Reverse Words in a String Medium · String, Two Pointers · Asked at Microsoft, Amazon
- 8. Increasing Triplet Subsequence Medium · Array, Greedy · Asked at Google, Meta
- 9. Zigzag Conversion Medium · String, Simulation · Asked at Amazon, Adobe
- 10. Spiral Matrix Medium · Array, Matrix, Simulation · Asked at Microsoft, Amazon, Google
- 11. Text Justification Hard · Array, String, Simulation · Asked at Google, Meta, Uber
- 12. First Missing Positive Hard · Array, Hash Table · Asked at Amazon, Google, Microsoft
- 13. Running Balance Ledger Easy · Array, Prefix Sum
- 14. Biggest Mirror From Letters Easy · String, Hash Table, Greedy, Counting
- 15. Quarter Turn In Place Medium · Array, Matrix, Math
- 16. Wipe Rows and Columns Medium · Array, Matrix, Hash Table
- 17. Zigzag Diagonal Walk Medium · Array, Matrix, Simulation
- 18. Count the Strict Peaks Easy · Array
- 19. Runner-Up Value Easy · Array
- 20. Secret Shift Message Easy · String
- 21. Zeros to the Front Easy · Array, Two Pointers
- 22. Sorted Squares From Both Ends Easy · Array, Two Pointers, Sorting
- 23. Diagonal Gap Easy · Array, Matrix
- 24. Turn Rows Into Columns Easy · Array, Matrix
- 25. Mirror and Invert a Bitmap Easy · Array, Matrix, Two Pointers, Bit Manipulation
- 26. Row Minimum, Column Maximum Easy · Array, Matrix
- 27. Email Local-Part Masker Easy · String
- 28. Longest Letter Streak Easy · String
- 29. One-Way Trend Easy · Array
- 30. The Missing Ticket Easy · Array, Math, Bit Manipulation
- 31. Doubled and Skipped Easy · Array, Hash Table, Math
- 32. Matching Value Pairs Easy · Array, Hash Table, Counting
- 33. How Many Are Smaller Easy · Array, Counting, Sorting
- 34. Is It a Ridge? Easy · Array
- 35. Best View to the Right Easy · Array
- 36. Out of Place in the Lineup Easy · Array, Sorting, Counting
- 37. Flip Only the Letters Easy · String, Two Pointers
- 38. Mirror Each Word Easy · String, Two Pointers
- 39. First Solo Character Easy · String, Hash Table, Counting
- 40. Same Bag of Letters Easy · String, Hash Table, Sorting
- 41. Drone Back at Base Easy · String, Simulation
- 42. Carousel Match Easy · String
- 43. Built From One Tile Easy · String
- 44. Binary String Sum Easy · String, Math, Bit Manipulation
- 45. Long Decimal Sum Easy · String, Math
- 46. Odometer Tick Easy · Array, Math
- 47. Sheet Column to Index Easy · String, Math
- 48. Index to Sheet Column Easy · String, Math
- 49. Read a Roman Numeral Easy · String, Hash Table, Math
- 50. Row k of the Number Triangle Easy · Array, Math
- 51. Longest Streak of Ones Easy · Array
- 52. Compact the Sorted List Easy · Array, Two Pointers
- 53. Constant Diagonals Easy · Array, Matrix
- 54. Blur the Picture Easy · Array, Matrix
- 55. Regrid the Cells Easy · Array, Matrix, Simulation
- 56. Restore the Tagged Sentence Easy · String, Sorting
- 57. Podium Labels Easy · Array, Sorting
- 58. Best Product of Three Easy · Array, Sorting, Math
- 59. Longest Triangle Fence Easy · Array, Sorting, Greedy, Math
- 60. Closest Value Pairs Easy · Array, Sorting
- 61. Parity Matches Index Easy · Array, Two Pointers
- 62. Absent From the Roll Easy · Array, Hash Table
- 63. Busiest Census Year Easy · Array, Prefix Sum, Counting
- 64. Squeeze the Repeats Easy · String, Two Pointers
- 65. Angle Between the Hands Easy · Math
- 66. Total Sprinkler Time Easy · Array, Simulation
- 67. Minimum Safe Start Easy · Array, Prefix Sum
- 68. Common Items With Repeats Easy · Array, Hash Table, Sorting, Two Pointers
- 69. A Value and Its Double Easy · Array, Hash Table
- 70. Order by Reference Easy · Array, Hash Table, Sorting, Counting
- 71. Licence Code Groups Easy · String
- 72. Does the Short Form Match? Easy · String, Two Pointers
- 73. Range Summary Lines Easy · Array
- 74. Best Binary Cut Easy · String, Prefix Sum
- 75. Distance to the Nearest Marker Easy · String, Array, Two Pointers
- 76. Top Unblocked Word Easy · String, Hash Table, Counting
- 77. One Swap From Twins Easy · String, Hash Table
- 78. Balanced Bit Blocks Easy · String, Two Pointers
- 79. Fewest Edits to a Mirror Easy · String, Two Pointers, Greedy
- 80. Shadows of a Block Tower Easy · Array, Matrix, Math
- 81. Paint for a Block Tower Easy · Array, Matrix, Math
- 82. Local Maxima Grid Easy · Array, Matrix
- 83. Rotation Makes Equal Easy · Array, Matrix
- 84. Slide the Grid Easy · Array, Matrix, Simulation
- 85. Is It a Word Square? Easy · Array, String, Matrix
- 86. Three Equal Parts by Sum Easy · Array, Greedy
- 87. Best Single Trade Easy · Array, Dynamic Programming
- 88. Farthest Different Houses Easy · Array, Greedy
- 89. Where Does the Pattern Start? Easy · String, Two Pointers
- 90. Checkpoints on One Line Easy · Array, Math
- 91. Tic-Tac-Toe Outcome Easy · Array, Matrix, Simulation
- 92. Closest Two Names Easy · Array, String
- 93. Sort by Rarity Easy · Array, Hash Table, Sorting
- 94. Gather the Tokens Easy · Array, Math, Greedy
- 95. Even Out the Spaces Easy · String
- 96. Letters and Digits Alternate Easy · String
- 97. Words Inside Other Words Easy · String
- 98. Unsorted Columns Easy · Array, String
- 99. Fill the Blanks Easy · String
- 100. Colony Next Generation Medium · Array, Matrix, Simulation