This repository contains my solutions to LeetCode algorithm problems, organized according to the classification system from 代码随想录 (Programmer Carl). The solutions are implemented in Python and follow the problem-solving approaches recommended by Carl.
The repository is organized into the following sections, mirroring the learning path from 代码随想录:
- 数组 (Array)
- Binary search
- Sliding window
- Spiral matrix
- 链表 (Linked List)
- Virtual head nodes
- Double pointers
- 哈希表 (Hash Table)
- Common hash structures
- Hash collisions
- 字符串 (String)
- KMP algorithm
- String reversal
- 双指针法 (Two Pointers)
- Fast-slow pointers
- Collision pointers
- 栈与队列 (Stack & Queue)
- Monotonic stacks
- Queue implementations
- 二叉树 (Binary Tree)
- Traversal methods
- BST operations
- 回溯算法 (Backtracking)
- Combination problems
- Permutation problems
- 贪心算法 (Greedy)
- Interval problems
- Stock problems
- 动态规划 (Dynamic Programming)
- 0-1 knapsack
- Complete knapsack
- 单调栈 (Monotonic Stack)
- Next greater element
- Daily temperatures
- 图论 (Graph Theory)
- DFS/BFS
- Topological sort
- Clean, well-commented code solutions
- Detailed explanations of algorithms
- Time and space complexity analysis
- Test cases for verification
- Follows Python coding best practices
- Navigate to the specific algorithm category
- Find the problem you're interested in
- Each solution file contains:
- Problem description
- Solution approach
- Implementation code
- Complexity analysis
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.