Retrieved from: https://mp.weixin.qq.com/s/A7N2_ftjhRCQOgulgOE3JQ
Leetcode's strongest guide to brushing questions (version 1.0)
Original programmer Carl code random thoughts 2020-12-27
Why is there this guide
Many students who have just started writing questions have a puzzle: where to start when facing nearly two thousand questions on LeetCode.
In fact, I answered this question on Zhihu before. The answer is probably to brush the array according to the following types -> linked list -> hash table -> string -> stack and queue -> tree -> backtracking -> greedy -> Dynamic programming -> graph theory -> advanced data structure , and then start from simple, after doing a few types of questions, then slowly do medium and difficult questions.
But I can feel that even with such an overall plan, it is very difficult for a beginner or even an algorithm veteran to find a suitable problem for him, the time cost is high, and the problem is not necessarily a classic one.
Regarding the problem of brushing, we all want to use the shortest time to write a classic problem, so that the efficiency is the highest!
So I put together this leetcode brush title of the strongest Guide: a super detailed brush title sequence, each question is my carefully selected, high-frequency face questions are the classic title , we just follow this order brush on it, you You read it right, that is, the order of the questions is arranged, and the order of the articles is the order of the questions! Just swipe one by one, you don't need to go to the sea to choose the topic by yourself!
In addition, I wrote detailed solutions for each topic (with pictures and texts, and the difficult points are accompanied by videos), and my solutions are listed on the first page of the corresponding topic, and the quality is obvious to all.
So today I sorted out the order of brushing the questions, to help more students who study algorithms avoid detours!
If you are brushing leetcode, it is strongly recommended to follow the order of brushing the questions in this article first. After brushing, you will find a qualitative leap in the entire knowledge system, so you don't have to look for directions blankly in the question sea .
How to use this question guide
When you look at the article on the topic below, you will find that many recording friends (friends who want to record with the code) leave a message under the article to check in. The order and solution of the questions have been accompanied by tens of thousands of recording friends, and it also explains the article. The quality is tested by tens of thousands of people!
Everyone who learns algorithms is welcome to join this learning camp!
If you are an algorithm veteran, this guide is also the best material for review. If you quickly go through the summary chapters corresponding to each series, the entire algorithmic knowledge system and various solutions will reappear in your mind .
In the process of reviewing the questions in the following order, each question solution must read the message under the corresponding article (the message can only be viewed on the mobile phone at present).
If you have any questions or find that there is something wrong with the article, you can find the answer in the message area. There are also many recording friends who have very good summaries. After reading it, it is also very rewarding.
At present, the "Code Random Thought Record" problem guide has been updated: 140 articles, elaborate on 100 classic algorithm problems, each series has a corresponding theoretical basis explanation at the beginning, and a corresponding summary chapter at the end of the series, and some difficult topics are still With a video explanation of about 20 minutes .
Having said that, are you ready now, go go go!
Leetcode's strongest question guide
Programming literacy
Job hunting
-
The programmer's resume should be written like this! ! (Attached resume template)
-
Internet companies technical interview process and matters needing attention
Algorithm performance analysis
-
Regarding time complexity, everything you don't know is here!
-
The O(n) algorithm actually timed out. How big is n at this time?
-
Through an interview question, talk about the time complexity of the recursive algorithm!
Array
Linked list
-
Linked list: I heard that using a virtual head node will be much more convenient?
-
Linked list: I've heard that I can't write a reversal linked list for two days?
Hash table
-
Hash table: You can use an array as a hash table, but the hash value should not be too large
-
Hash table: the hash value is too large, still have to use set
-
Hash table: In fact, you can find map wherever you need to hash
-
Hash table: After solving the sum of two numbers, can the sum of three numbers be solved?
-
Double pointer method: the same principle can solve the sum of four numbers
String
-
String: This problem can be solved with one line of code using library functions
-
The video is coming! ! Take you through KMP algorithm (theory & code)
Double pointer method
-
String: This problem can be solved with one line of code using library functions
-
Linked list: I've heard that I can't write a reversal linked list for two days?
-
Hash table: After solving the sum of two numbers, can the sum of three numbers be solved?
-
Double pointer method: the same principle can solve the sum of four numbers
Stacks and queues
-
Stacks and queues: How about I use stacks to implement queues?
-
Stacks and queues: using queues to implement stacks is a bit awkward
-
Stacks and queues: stack applications are everywhere in the system
-
Stacks and queues: matching problems are the strengths of the stack
-
Stacks and queues: Ever wondered how computers process expressions?
-
Stack and queue: What is the relationship between the top K high-frequency elements and the queue?
Binary tree
-
Binary tree: Once the recursion is as deep as the sea, the offer is a passerby since then
-
Binary tree: I heard that what recursion can do, so can stacks!
-
Binary tree: Can't the wording of the front, middle and back order iterations be unified?
-
Binary tree: I thought that recursion was used, but in fact, there is backtracking
-
Binary tree: After doing so many questions, what is the sum of my left leaves?
-
Binary tree: When does a recursive function need to return a value, and when does it not?
-
Binary tree: the smallest absolute difference of the search tree
-
Binary Tree: Summary! (All the binary tree skills that need to be mastered are here)
Backtracking algorithm
-
The video is coming! ! Take you through the backtracking algorithm (theory)
-
The video is coming! ! Backtracking algorithm: combinatorial problem
-
Backtracking algorithm: Combination problem and then pruning
-
The video is coming! ! Backtracking algorithm: pruning operation of combinatorial problems
-
This week's summary! (Backtracking Algorithm Series Three) Sequel
-
A summary takes you to thoroughly understand the backtracking algorithm!
greedy
-
Greedy algorithm: the sum of the arrays maximized after K inversions
-
Greedy Algorithm: Rebuilding the queue based on height (sequel)
-
Greedy Algorithm: Use the least number of arrows to detonate the balloon
At present, the greedy algorithm series is being explained in the official account "Code Caprice", and it is continuously updated!
Follow "Code Caprice Record" to follow the latest progress, and check in and learn with tens of thousands of recording friends!
Dynamic programming
Greedy -> Dynamic Programming
Graph Theory
Greedy -> Dynamic Programming -> Graph Theory
to sum up
I want to emphasize here: the classic topic is not finished with one scan. You need to scan it many times , because when you scan a topic, you will definitely forget some of your previous knowledge. For example, if you brush with greed, you may not think about it when you go back. Woke up.
So be sure to scan more to deepen the memory, and then start to read the summary articles of each topic some time before the interview, and conduct a quick review .
The follow-up of this tutorial guide will be launched in web version and pdf version, which is convenient for everyone to read articles online or offline on the computer.
Currently viewing the article on the computer side, you can view it on Github: https://github.com/youngyangyang04/leetcode-master . Github will be updated regularly, and the progress will be 1-2 days slower than the official account. Welcome to give a star by the way!
Regarding the algorithm video, you can pay attention to station B: The code is recorded as you want, you can watch my algorithm video, and I will update it regularly!
Learn the algorithm step by step and look for "Code Random Record"!
"Code Caprice Record" looks forward to your attention!
A classic algorithm topic is pushed on time at 8:35 every day. Each topic pushed is not isolated, but from shallow to deep, interlocking, to help you sort out the algorithm knowledge and learn the algorithm easily!
You can add me to WeChat if you team up to brush questions!
Personal WeChat on the right, note when adding: "Simple self-introduction" + "Team to write questions"