当前位置:网站首页>Three questions for learning new things

Three questions for learning new things

2022-06-21 14:26:00 Record brother

When we want to talk about a thing , You need to ask yourself three questions : What is it? ? Why? ? What about? ?

What programmers are familiar with " Data structures and algorithms " Pull it out , Torture


One . What is it? ?

What is data structure and algorithm

  • data structure , It is the storage structure of a group of data .

  • Algorithm , Is a set of methods for manipulating data .

  • Data structure is for algorithm , The algorithm should work on a specific data structure .


Two . Why? ?

Why data structures and algorithms are needed

With the rapid development of computer science and Internet , The amount of data to be calculated is becoming larger and larger . But the computing power of the computer is limited , Such a large amount of data calculation , More and more computers are needed , It takes longer and longer to calculate , Focusing on efficiency, we need to improve the computing efficiency as much as possible .

One of the most important items , Is to use appropriate data structures and algorithms . Select the appropriate data structure and algorithm , Especially when dealing with very large data , It can greatly improve the computational efficiency . that , The third question is , How do we choose the right data structure and algorithm ? Are there any measures ?


3、 ... and . What about? ?

How to measure the effect of data structure and algorithm

Need to introduce a measure (metric): Time complexity and space complexity .

The cornerstone of learning data structures and algorithms , Is to learn ` Complexity analysis `. Know how to analyze complexity , To make a correct judgment , Choose the right algorithm in a specific scenario . Instead of blindly memorizing , Mechanical operation .

Add a chicken leg to everyone :

  • 10 Data structures : Array , Linked list , Stack , queue , Hash table , Binary tree , Pile up , Jump watch , chart ,Trie Trees

  • 10 Algorithms :  recursive , Sort , Two points search , Search for , The hash algorithm , Greedy Algorithm , Divide and conquer algorithm , Backtracking algorithm , Dynamic programming , String matching algorithm

  • The data structure is too abstract ? Come on, come on , Send you a treasure book , It is a data structure visualization website , Visually describe various operations of common data structures , Change abstract to concrete :https://www.cs.usfca.edu/~galles/visualization/Algorithms.html

https://www.cs.usfca.edu/~galles/visualization/Algorithms.html

原网站

版权声明
本文为[Record brother]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202221425206340.html