This repository contains copiloted solutions to classic problems from LeetCode. The solutions are written in Python (C++ comes in the future), and are organized by categories for easy reference.
- Sorting
- Linked List
- Queue
- Stack
- Hashing
- Binary Search
- Two Pointers
- BFS
- DFS
- Prefix Sum
- Graph
- String&Array
- Leetcode 4. Median of Two Sorted Arrays
- Leetcode 27. Remove elements
- Leetcode 56. Merge Intervals
- Leetcode 75. Sort Colors
- Leetcode 148. Sort List
- Leetcode 179. Largest Number
- Leetcode 215. Kth Largest Element
- Leetcode 92. Reverse Linked List II
- Leetcode 141. Linked List Cycle
- Leetcode 160. Intersection of Two Linked Lists
- Leetcode 206. Reverse Linked List
- Leetcode 328. Odd Even Linked List
- Leetcode 876. Middle of the Linked List
- Leetcode 54. Spiral Matrix
- Leetcode 225. Implement Stack using Queues
- Leetcode 281. Zigzag Iterator
- Leetcode 346. Moving Average from Data Stream
- Leetcode 362. Design Hit Counter
- Leetcode 1429. First Unique Number
- Leetcode 20. Valid Parentheses
- Leetcode 150. Evaluate Reverse Polish Notation
- Leetcode 155. Min Stack
- Leetcode 224. Basic Calculator II
- Leetcode 232. Implement Queue using Stacks
- Leetcode 735. Asteroid Collision
- Leetcode 1209. Remove All Adjacent Duplicates in String II
- Leetcode 1249. Minimum Remove to Make Valid Parentheses
- Leetcode 1472. Design Browser History
- Leetcode 1. Two Sum
- Leetcode 49. Group Anagrams
- Leetcode 73. Set Matrix Zeroes
- Leetcode 128. Longest Consecutive Sequence
- Leetcode 146. LRU Cache
- Leetcode 299. Bulls and Cows
- Leetcode 350. Intersection of Two Arrays II
- Leetcode 380. Insert Delete GetRandom O(1)
- Leetcode 348. Design Tic-Tac-Toe
- Leetcode 409. Longest Palindrome
- Leetcode 454. 4Sum II
- Leetcode 33. Search in Rotated Sorted Array
- Leetcode 34. Find First and Last Position of Element in Sorted Array
- Leetcode 74. Search a 2D Matrix
- Leetcode 162. Find Peak Element
- Leetcode 240. Search a 2D Matrix II
- Leetcode 278. First Bad Version
- Leetcode 1095. Find in Mountain Array
- Leetcode 1. Two Sum
- Leetcode 3. Longest Substring Without Repeating Characters
- Leetcode 5. Longest Palindromic Substring
- Leetcode 11. Container With Most Water
- Leetcode 15. 3Sum
- Leetcode 16. 3Sum Closest
- Leetcode 18. 4Sum
- Leetcode 125. Valid Palindrome
- Leetcode 167. Two Sum II - Input array is sorted
- Leetcode 186. Reverse Words in a String II
- Leetcode 283. Move Zeroes
- Leetcode 647. Palindromic Substrings
- Leetcode 102. Binary Tree Level Order Traversal
- Leetcode 103. Binary Tree Zigzag Level Order Traversal
- Leetcode 127. Word Ladder
- Leetcode 314. Binary Tree Vertical Order Traversal
- Leetcode 542. 01 Matrix
- Leetcode 752. Open the Lock
- Leetcode 815. Bus Routes
- Leetcode 1091. Shortest Path in Binary Matrix
- Leetcode 1293. Shortest Path in a Grid with Obstacles Elimination
- Leetcode 101. Symmetric Tree
- Leetcode 104. Maximum Depth of Binary Tree
- Leetcode 105. Construct Binary Tree from Preorder and Inorder Traversal
- Leetcode 124. Binary Tree Maximum Path Sum
- Leetcode 130. Surrounded Regions
- Leetcode 133. Clone Graph
- Leetcode 200. Number of Islands
- Leetcode 226. Invert Binary Tree
- Leetcode 236. Lowest Common Ancestor of a Binary Tree
- Leetcode 297. Serialize and Deserialize Binary Tree
- Leetcode 417. Pacific Atlantic Water Flow
- Leetcode 490. The Maze
- Leetcode 543. Diameter of Binary Tree
- Leetcode 951. Flip Equivalent Binary Trees
- Leetcode 987. Vertical Order Traversal of a Binary Tree
- Leetcode 53. Maximum Subarray
- Leetcode 304. Range Sum Query 2D - Immutable
- Leetcode 523. Continuous Subarray Sum
- Leetcode 1031. Maximum Sum of Two Non-Overlapping Subarrays
- Leetcode 1423. Maximum Points You Can Obtain from Cards
This repository is primarily for my personal learning, but suggestions and improvements are welcome.