Leetcode solutions

The following are my solutions to various leetcode problems, listed chronologically starting with the most recently solved.  You can find a link to my profile here.


  1. Simplify Path
  2. → stack

    June 9, 2023

  3. Summary Ranges
  4. → intervals

    June 8, 2023

  5. Is Subsequence
  6. → two pointers

    June 8, 2023

  7. Reverse Words In a String
  8. → strings

    June 8, 2023

  9. Valid Anagram
  10. → hashmap

    June 7, 2023

  11. Isomorphic Strings
  12. → Hashmap

    June 7, 2023

  13. Happy Number
  14. → hashmap

    June 7, 2023

  15. Word Pattern
  16. → hashmap

    June 7, 2023

  17. Merge Two Sorted Lists
  18. → linked list

    June 6, 2023

  19. Find the Index of the First Occurrence in a String
  20. → strings

    June 6, 2023

  21. Valid Palindrome
  22. → Two pointers

    June 6, 2023

  23. Linked List Cycle
  24. → Linked List

    June 6, 2023

  25. Ransom Note
  26. → Hashmap

    June 6, 2023

  27. Remove Duplicates From Sorted Array
  28. → arrays

    June 6, 2023

  29. Gas Station
  30. → arrays

    June 5, 2023

  31. Length of Last Word
  32. → strings

    June 5, 2023

  33. Jump Game
  34. → arrays

    June 5, 2023

  35. Majority Element
  36. → arrays

    June 4, 2023

  37. Rotate Array
  38. → arrays

    June 4, 2023

  39. Merge Sorted Array
  40. → arrays

    June 4, 2023

  41. Swapping Nodes in a Linked List
  42. → Linked List

    June 3, 2023

  43. Remove Element
  44. → Arrays

    June 3, 2023

  45. Dota2 Senate
  46. → queues

    may 31, 2023

  47. Valid Parentheses
  48. → stack

    may 31, 2023

  49. Contains Duplicate
  50. → hashmap

    may 31, 2023