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. Find the Highest Altitude
    → strings

    July 22, 2023

  2. Reverse Vowels of a String
    → strings

    July 22, 2023

  3. Merge Strings Alternately
    → strings

    July 21, 2023

  4. Permutations
    → arrays

    July 20, 2023

  5. Swap Nodes in Pairs
  6. → linked lists

    July 20, 2023

  7. Generate Parentheses
    → strings

    July 18, 2023

  8. Course Schedule
    → graph bfs

    July 2, 2023

  9. Search in Rotated Sorted Array
    → Binary Search

    July 1, 2023

  10. Find First and Last Position of Element in Sorted Array
  11. → Binary Search

    june 30, 2023

  12. Find Peak Element
    → binary search

    June 30, 2023

  13. Search a 2D Matrix
    → binary search

    June 30, 2023

  14. Search Insert Position
    → binary search

    June 30, 2023

  15. Clone Graph
    → graph bfs

    June 28, 2023

  16. Number of Islands
    → graph bfs

    June 27, 2023

  17. Kth Smallest Element in a BST
  18. → binary search tree

    June 26, 2023

  19. Validate Binary Search Tree
    → binary search tree

    June 26, 2023

  20. Convert Sorted Array to Binary Search Tree
  21. → binary search tree

    June 24, 2023

  22. Minimum Absolute Difference in BST
    → binary search tree

    June 23, 2023

  23. Populating Next Right Pointers in Each Node II
    → binary tree bfs

    June 23, 2023

  24. Binary Tree Zigzag Level Order Traversal
    → binary tree bfs

    June 22, 2023

  25. Binary Tree Level Order Traversal
    → binary tree bfs

    June 22, 2023

  26. Binary Tree Right Side View
    → binary tree bfs

    June 22, 2023

  27. Average of Levels in Binary Tree
    → binary tree bfs

    June 22, 2023

  28. Binary Search Tree Iterator
    → binary search tree

    June 22, 2023

  29. Flatten Binary Tree to Linked List
    → binary tree

    June 22, 2023