How to Write Algorithm Easier(怎样更容易和快速的写出一个算法)

With Clear Thinking

Here I am not talking about the details of various algorithms, instead, I am going to share one of my recent experiences of algorithm design and writing.

The big mistake I have been making is starting to write code at the beginning. Today, I want to say, don’t do this!

When I already have a clear road of how to do it in mind, then I need to write and draw it down to prove the idea the is correct and it works on paper. After doing this, I would write the code in the text editor.

I found this way is easier, accurate and efficient.

So, my new slogan is “Don’t write code first, Pick up your paper and pencil!”