Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

LeetCode Algorithm Solutions

License

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.

Repository Structure

The repository is organized into the following sections, mirroring the learning path from 代码随想录:

Core Algorithm Categories

  • 数组 (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

Features

  • Clean, well-commented code solutions
  • Detailed explanations of algorithms
  • Time and space complexity analysis
  • Test cases for verification
  • Follows Python coding best practices

How to Use

  1. Navigate to the specific algorithm category
  2. Find the problem you're interested in
  3. Each solution file contains:
    • Problem description
    • Solution approach
    • Implementation code
    • Complexity analysis

Resources

Contribution

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages