Puretalk. algorithms and data structures-Preface

Source: Internet
Author: User

<! --
@ Page {margin: 2 cm}
P {margin-bottom: 0.21}
-->

Puretalk.
Algorithm and Data Structure

 

Preface

 

"Puretalk.
The goal of writing algorithms and data structures is to separate the idea of algorithms from the code details in specific implementations. We sometimes feel that once we leave the code, we cannot effectively extend our algorithms. This is often due to the absence of in-depth thinking on the nature of algorithms. In this case, we often rely on code to "remember" The algorithm. This kind of knowledge is not abstract, and it is often difficult to apply it to new variants of the problem. In this way, because our solution to the alarm clock storage is too "specific ", therefore, when we encounter problems and seek solutions, it is difficult to match these problems with our existing solutions in a pattern. To make our knowledge useful, we need to abstract our knowledge. Knowledge is like a tree that grows upside down. The higher the abstraction level, the more nodes that can be touched down.

 

C
Languages and other programming languages are often too specific to implement algorithms. Even when used as code, it is difficult to present the essential features of algorithms. The programming implementation of an algorithm contains details beyond the core of the algorithm. For example
In the language, when we want to swap two variables
And B
We need to introduce another temporary variable temp
And perform the following operations:

 

Temp
=;

A =
B;

B =
Temp;

 

The three lines of code only mean "exchanging variable values ". For example, when we use code to insert an algorithm, an ordered set is gradually located at the front or back of the original disordered set (usually an array, it continues to expand, and eventually replaces the original unordered set, thus realizing the orderliness of the set. The shock that this code technique brings to us is usually distracting. It is very easy for us to ignore the essence of algorithms. In the insert sort example, there are always two logically independent sets of "order" and "unorder". This important information is easily ignored.

 

Puretalk
Use the text form to show the essence of the algorithm, so that the encoding skills are separated. Why are we more focused on the essence of algorithms. Economists in ancient times can analyze economic phenomena without any mathematical equation. The essence of an algorithm should be the idea behind a specific solution. We may wish to keep it pure.

 

Of course, the idea of code implementation is a technology and an art that we always pursue.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.