This repository is to maintain a list of submissions as well as writeups to some interesting Leetcode questions I've personally come across. I try to prioritize more of data structures and algorithms style questions rather than trivial ones but you may find any sort of questions here.
Python is used because I think that it reads like pseudocode for the most part, and so it should be fairly easy to understand even if you don't know the language. I've also wrote JavaScript solutions for every problem, and occasionally TypeScript as well.
Problem | Difficulty | Solution |
---|---|---|
141. Linked List Cycle | Easy |
Solution |
206. Reverse Linked List | Easy |
Solution |
2095. Delete the Middle Node of a Linked List | Medium |
Solution |
234. Palindrome Linked List | Easy |
Solution |
237. Delete Node in a Linked List | Medium |
Solution |
83. Remove Duplicates from Sorted List | Easy |
Solution |
...
...
Problem | Difficulty | Solution |
---|---|---|
98. Validate Binary Search Tree | Medium |
Solution |
104. Maximum Depth of Binary Tree | Easy |
Solution |
111. Minimum Depth of Binary Tree | Easy |
Solution |
226. Invert Binary Tree | Easy |
Solution |
101. Symmetric Tree | Easy |
Solution |
102. Binary Tree Level Order Traversal | Medium |
Solution |
103. Binary Tree Zigzag Level Order Traversal | Medium |
Solution |
297. Serialize and Deserialize Binary Tree | Hard |
Solution |
...