I have an idea. It may not be right

I think a good programmer can do it quickly.

At present, I am also a high-level programmer. I won offers from Byte, Ali and Baidu in one breath.

When I was an average programmer, I thought there were two stages to becoming a god:

Stage 1: Go from a programmer to a skilled developer

Stage 2: Go from skilled developer to senior architect

The first stage requires your specific technical ability, and the second stage requires your mature technical system. Finish these two steps, and maybe we can get closer to god.

I don’t know if you have encountered this situation, clearly brush 400-500 questions, are almost brush vomit, but also no effect. And the big guy next door casually brush dozens can enter big factory. This is a classic example.

Being a good programmer isn’t about “training”, it’s about shortcuts to learning. If students find the right learning method, quick learning is not a problem.

I myself is a typical example, when looking for a job, the slogan can be loud, to be stupid birds fly first! Then every day to make their own sea tactics, also do not copy, do not sum up. I don’t know how many times I roll over.

Looking back, I feel like a fool. That is, until my roommate, who cares for retarded people, gave me a set of algorithm cheat sheets. It was like flipping a switch to improve my algorithmic skills, and God knows how much I thanked him…

This algorithm cheat sheet includes algorithms and data structures that are often tested in interviews with big companies. Things like dichotomy, double Pointers, sorting algorithms and so on. Examples are also given for the common test questions. It really smells good! Share with the students like me who aspire to be a programming master!!

And the magic of the cheat sheet was that he could use it on a template.

Take, for example, a common dual-pointer for job interviews:

Conditions of use

Sliding Windows (90%)

Time complexity O(n) (80% dual Pointers)

Requires in-situ operation, only swap can be used, no extra space can be used (80%)

Keywords with subarray/string substring (50%)

Palindrome keywords (50%)

The complexity of the

Time complexity: O(n)

  • The time complexity is related to the number of times the innermost loop body is executed

  • It doesn’t matter how many loops there are

Space complexity: O(1)

You only need to allocate extra memory for two Pointers

Lintcode sample

• LintCode1879. Sum of two numbers VII

• LintCode1712. And the same binary subarray (double pointer)

• LintCode627. Longest palindrome string (back to double pointer)

• LintCode64: Merge ordered arrays

Partial code template

Java

Python

After finishing the example, go to the collar button to find a few similar topics to practice hand, feel immediately have, other algorithm knowledge points are the same, draw inferinferies, thief easy to use.

If you need a template, you can also use si ** [algorithm template] **, or poke here.

Here’s how to solve the problem:

binary

Sorting arrays (30-40% dichotomy)

When the interviewer asks you to find a time complexity algorithm smaller than O(n) (99%)

Find a split position in the array such that the left half meets a condition and the right half does not (100%)

Find a maximum/minimum value for a condition to be satisfied (90%)

Double pointer

Sliding Windows (90%)

Time complexity O(n) (80% dual Pointers)

Requires in-situ operation, only swap can be used, no extra space can be used (80%)

Keywords with subarray/substring substring (50%)

Palindrome keywords (50%)

BFS

Topological sort (100%)

Keywords with connected blocks (100%)

Layered traversal (100%)

Simple graph shortest path (100%)

Given a transformation rule, at least a few steps from the initial state to the final state (100%)

Binary trees and divide and conquer

• Binary tree related problems (99%)

• Can be split in two and processed separately before merging results (100%)

• Array related issues (10%)

In addition to learning methods have “shortcut”, I also think, those who are highly skilled in programming, are very good at brushing questions.

Not as I did at the beginning of the sea tactics, but targeted brush.

At first, I felt very stressed when I brushed the questions. Because too many brushes don’t work. So for me, brushing questions does not arouse my interest. But then my friend dragged me to miss Linghu’s lecture on ** algorithm. Suddenly all was clear.

Because he will often test the algorithm in the interview knowledge and inspection frequency are listed, so to brush the question is very targeted. I’m sure that’s how the programming gurus learn.

Here to share an interview algorithm often test knowledge points and survey frequency. If you want to improve your algorithm quickly, try this method.

At the same time, this lecture has ** free audition **, interested friends can go to listen to.

In addition, to share my experience of going ashore, I have the habit of “cramming at the last minute” before going ashore, so I not only brush the topic according to the inspection frequency of test points, but also according to the different preferences of each big factory.

For example, like this, targeted to brush the enterprise question bank, I do not believe that the shore.

Here are a few of the questions I’ve checked in ** Lintcode ** so you can practice:

804 · Number of different islands II

294 · Simplified linked lists

549 · K words most commonly used (Map Reduce)

660 · Read N characters from file with Read4 II- multiple calls

734 · Number of subsequences of the form A ^ I, b^j, c^k

1076 · Minimum delete sum of two strings ASCII

Now I can brush questions can bring me a great sense of achievement, I hope you can also find the correct methodology of programming learning, quickly advanced to a high-level master!!

Code word is not easy, please give a like or comment.