knaxuslearn · build · ship

Two Pointers

Two indexes walk the input, often from both ends, so you skip the nested loop. 218 problems from 44 companies, most widely asked first. Tick them off as you go; your ticks stay in this browser.

problems
218
hard
27
done
0

218 of 218 problems

  1. 1Trapping Rain Water (opens LeetCode in a new tab)Array, Two Pointers, Dynamic ProgrammingHard26companies
  2. 2Longest Palindromic Substring (opens LeetCode in a new tab)Two Pointers, String, Dynamic ProgrammingMedium25companies
  3. 3Container With Most Water (opens LeetCode in a new tab)Array, Two Pointers, GreedyMedium24companies
  4. 43Sum (opens LeetCode in a new tab)Array, Two Pointers, SortingMedium23companies
  5. 5Valid Palindrome (opens LeetCode in a new tab)Two Pointers, StringEasy22companies
  6. 6Move Zeroes (opens LeetCode in a new tab)Array, Two PointersEasy21companies
  7. 7Sort Colors (opens LeetCode in a new tab)Array, Two Pointers, SortingMedium21companies
  8. 8Meeting Rooms II (opens LeetCode in a new tab)Array, Two Pointers, GreedyMedium20companies
  9. 9Merge Sorted Array (opens LeetCode in a new tab)Array, Two Pointers, SortingEasy19companies
  10. 10Next Permutation (opens LeetCode in a new tab)Array, Two PointersMedium19companies
  11. 11String Compression (opens LeetCode in a new tab)Two Pointers, StringMedium18companies
  12. 12Find Median from Data Stream (opens LeetCode in a new tab)Two Pointers, Design, SortingHard17companies
  13. 13Remove Duplicates from Sorted Array (opens LeetCode in a new tab)Array, Two PointersEasy17companies
  14. 14Reverse Words in a String (opens LeetCode in a new tab)Two Pointers, StringMedium17companies
  15. 15Happy Number (opens LeetCode in a new tab)Hash Table, Math, Two PointersEasy16companies
  16. 16Palindromic Substrings (opens LeetCode in a new tab)Two Pointers, String, Dynamic ProgrammingMedium16companies
  17. 17Rotate Array (opens LeetCode in a new tab)Array, Math, Two PointersMedium16companies
  18. 18Linked List Cycle (opens LeetCode in a new tab)Hash Table, Linked List, Two PointersEasy15companies
  19. 194Sum (opens LeetCode in a new tab)Array, Two Pointers, SortingMedium13companies
  20. 20Find K Closest Elements (opens LeetCode in a new tab)Array, Two Pointers, Binary SearchMedium12companies
  21. 21Find the Duplicate Number (opens LeetCode in a new tab)Array, Two Pointers, Binary SearchMedium12companies
  22. 22Find the Index of the First Occurrence in a String (opens LeetCode in a new tab)Two Pointers, String, String MatchingEasy12companies
  23. 23Permutation in String (opens LeetCode in a new tab)Hash Table, Two Pointers, StringMedium12companies
  24. 24Reverse String (opens LeetCode in a new tab)Two Pointers, StringEasy12companies
  25. 25Middle of the Linked List (opens LeetCode in a new tab)Linked List, Two PointersEasy11companies
  26. Showing 25 of 218

"Companies" counts the companies in DSA Atlas that have asked the problem at any time. Patterns and data structures come from LeetCode topic tags. Your ticks are saved in this browser only, and shared with the company pages.

Credits

These lists are the work of two open GitHub projects. Thank you to their authors.

Problem text stays on LeetCode; we link to it. Frequencies are relative within a company.

Last synced