Algrithom week1

2020.1.14 - Week 1 - Tuesday

Fast, smooth algorithm to solve a problem of three prerequisites are:

  1. Understanding and mastery of basic data structures
  2. Analysis and simplify the topic (issue transformation and modeling)
  3. Skilled Coding

Now we have a preliminary understanding and mastery of basic data structures, including trees, stacks, hash tables, arrays, strings. Figure not particularly understand.

Why talk about arithmetic lesson Proof, problem-solving is the corresponding second prerequisite, that is the subject of analysis, transformation, modeling. Proof is to solve, a problem proved farsighted ideas. General solution algorithm is to solve certain problems. It is necessary to analyze Corner Case, and all possible cases. When proof, as in the first spoken Chou, can follow the proven mathematical induction, establishment syndrome n = 0, n is assumed that the establishment, re-establishment syndrome n + 1. Also evidence to the contrary, proof that its opposite is not true. In the algorithm, which can be summarized as induction, recursion recursion, and dynamic programming dynamic planning. They are small to large, from the bottom to verify the results.

Then have ideas, you need to clear this idea, then smooth it into code.

And then for the second, analysis, transformation, and the ability to model, which is a part of the biggest test of thinking ability.
Common essay ideas can be, forget the whole, considering local.

Perhaps there will be a lot of time problem-solving ideas, such as fb ah plus face that time, yes you have ideas, but this idea is not simple, it will lead to many cases need to be considered, it will be chaos, then you do not write code or write out the chaos, others (specifically refers to the interviewer), will be lost, you lost on the cold, because not enough concise and written in a no result in the stipulated time is cold. Then how can we not cool, it is necessary to simplify the ideas, misses the point, yes, often considered too complicated misses the main point, resulting in a complex solution, which is why people reject the very powerful mathematical and physics equations are very concise of.
So it is necessary to simplify the problem to the extent that you can handle, and then you are an ordinary person Diudiu a partial smart people, so on behalf of the majority of people can handle, if they can not handle, explain this code readability is poor, difficult to understand, not enough to make most people in a short handle.


Reference:
[local principle: 80% of this routine are the subject (subject-frequency analysis attached)]
https://www.1point3acres.com/bbs/thread-580762-1-1.html

Released six original articles · won praise 0 · Views 113

Guess you like

Origin blog.csdn.net/mllejuly/article/details/103982757