leetcode
LeetCode
since 2019-09-03 19:40
简体中文 | English
This essay records the course of and my emotion to this project from initialization to 10,000 stars. Milestone for 10,000+ stars
If you are interested in this project, do not mean your star. This project will be supported for a long enough time by the community. Thanks for every audience and contributor.
Introduction
LeetCode Solutions: A Journey of Problem Solving.
This repository is divided into five parts for now:
-
The first part is the solutions to some classic problems on LeetCode, including the idea thinkings, key points and code implementations.
-
The second part is a summary of data structures and algorithms.
-
The third part is Anki flashcards that organizes the LeetCode problems in a certain way to make it easier to remember.
-
The fourth part is daily challenges which were held at group chat. We usually solve one problem altogether to get more feedback. Moreover, the problems can be drafted to add to the problem solving module.
-
The fifth part is a future planning on content that will be introduced into the above parts.
Only when having mastered the basic data structures and algorithms can you solve complex problems easily.
About me
I, a programmer, am all passionate about technology.
Used to write
and
, I am a frontend engineer and focused on the engineering, optimization and standardization for frontend.
If you want to do some contributions or collaborations, just feel free to contact me via [azl397985856@gmail.com].
Usage Instructions
- For the parts that were added recently, there will be a behind.
- For the parts that were updated recently, there will be a 🖊 behind.
- Here will be the place to update Anki Flashcards in the future as well.
- Here is a mind mapping graph showing the summary of categorizations of problems that are questioned frequently in interviews. We could analyze according to the information in the graph.
(Picture credited by LeetCode-cn.)
The algorithms mainly include:
- Basic skills: Divide-and-Conquer; Binary; Greedy
- Sorting algorithms: Quicksort; Merge Sort; Counting Sort
- Searching algorithms: Backtracking; Recursion; Depth-First-Search (DFS); Breath-First-Search (BFS); Binary Search Tree; etc.
- Graph theory: Shortest Path Problem; Minimal Spanning Tree
- Dynamic Programming: Knapsack Problem; Longest Common Subsequence (LCS) Problem
The data structures mainly include:
- Array and linked list: Singly/Doubly-Linked List
- Stack and queue
- Hash table
- Heap: Min-Max Heap
- Tree and Graph: Lowest Common Ancestor (LCA); Disjoint-Set
- String: Prefix Tree (Trie); Suffix Tree
Previews (Translation in Progress)
Portals
Solutions to LeetCode Classic Problems
Here only lists some representative problems but not all.
Easy
Medium (Translation in Progress)
Hard (Translation in Progress)
- 0025.reverse-nodes-in-k-group
- 0042.trapping-rain-water🆕
- 1168.optimize-water-distribution-in-a-village
Summary of Data Structures and Algorithm
- Basic data structure (overview)
- I have almost finished brushing all the linked topics of Lixu, and I found these things. 。 。
- I have almost finished brushing all the tree questions of Lixu, and I found these things. 。 。
- 堆专题(上) (WIP)
- I have almost finished brushing all the piles of questions, and I found these things. 。 。 (Second bullet)
- I have almost finished brushing all the two-point questions of Lixiu, and I found these things. 。 。 (Part 1)
- I have almost finished brushing all the two-point questions of Lixiu, and I found these things. 。 。 (Part 2)
- Dynamic Programming
- Search Problems
- Binary Tree Traversal
- Backtracking
- Run code and Huffman code
- Bloom filter🖊
- Trie🖊
- 滑动窗口(思路 + 模板) (WIP)
- Bit Operation
- Kojima Question🖊
- GCD Problems
- Union Find (Disjoint Set) Problem
- Balanced Binary Tree
- Reservoir Sampling
- Monotonic stack
Anki Flashcards
Anki falshcards would be mainly two parts: the mappings from key points to problems; the mappings from problems to idea thinks, key points and code implementations.
All flashcards are put in anki-card.
Please check here for more about the usage of Anki.
Latest updated flashcards (only lists the front page):
- What is the key point of the binary search algorithm? Related problems?
- How to simplify the operations using the features of stacks? Related problems?
- The thinkings and related problems of double-pointers problems?
- The thinkings and related problems of sliding window problems?
- The thinkings and related problems of backtracking?
- The thinkings and related problems of number theory?
- The thinkings and related problems of bit operations?
WIP: the translation of the flashcards are on the way.
problems added:#2 #3 #11
Community Chat Groups
We're still on the early stage, so feedback from community is very welcome. For sake of reducing the costs of communication, I created some chat groups.
Telegram
QQ (For China Region)
WeChat (For China Region)
(Add this bot and reply "leetcode" to join the group.)
Contribution
- If you have any ideas, Issues or chat in groups.
- If you want to commit to the repository, Pull Request is welcome. Here is the CONTRIBUTION GUIDE
- If you want to edit images resources in this project, here lists the files that can be edited on draw.io.
Thank you
A big Thank you to every contributor of this project.