当前位置:网站首页>Chapter I Introduction
Chapter I Introduction
2022-07-28 14:56:00 【Three waters of ndream】
Chapter one The introduction
Chapter two The linear table
The third chapter Stack 、 Queues and arrays
Chapter four strand
The fifth chapter Trees and binary trees
Chapter six chart
Chapter vii. lookup
Chapter viii. Sort
00 The opening —— What data structures are learning
- How to use program code to informationize real-world problems
- How to process this information efficiently with computers

01 The introduction

1.1 Basic concepts

data : Data is the carrier of information , It's a number that describes the attributes of an objective thing 、 A collection of characters and all symbols that can be input into a computer and recognized and processed by a computer program . Data is the raw material for computer programming
data elements : It's the basic unit of data , Usually considered and dealt with as a whole
A data element can consist of several data items , A data item is the smallest indivisible unit of data elements 
A data object is a collection of data elements with the same properties , It's a subset of the data
A data structure is a collection of data elements with one or more specific relationships
The course of data structure focuses on the relationship between data elements , And operations on these data elements , And don't care about the specific data item content
The same data elements , Can form different data structures
Different data elements can form the same data structure
1.2 The three elements of data structure

1.2.1 Logical structure

1.2.2 The operation of data
The operation of data : For a logical structure , Combined with actual needs , Define basic operations ( Additions and deletions )

1.2.3 Physical structure ( Storage structure )
Sequential storage : Store logically adjacent elements in a physical location that is also adjacent to each other , The relationship between elements is represented by the adjacency of storage units .
Chain store : Logically adjacent elements may not be adjacent in physical position , The logical relationship between elements is represented by a pointer indicating the storage address of the element .
Index storage : While storing element information , Also create additional index tables . Each item in an index table is called an index entry , The general form of an index entry is ( keyword , Address )
Hash store : According to the key words of the element, the storage address of the element can be calculated directly , Also known as hash (Hash) Storage
1.2.4 data type 、 Abstract data types
A data type is a collection of values and a set of operations defined on it .
- Type of atom . A data type whose value cannot be subdivided .
- Structure type . Its value can be further decomposed into several components ( component ) Data type of .
Abstract data types (Abstract Data Type,ADT) Abstract data organization and its related operations


1.3 The basic concept of algorithm

1.3.1 What is algorithm

Algorithm (Algorithm) It is a description of the steps to solve a specific problem , It is a finite sequence of instructions , Each of these instructions represents one or more operations
1.3.2 Characteristics of the algorithm
- Fineness : An algorithm must always end after a finite step , And each step can be completed in limited time .( The algorithm is finite , And programs can be infinite )
- deterministic : Every instruction in an algorithm must have a precise meaning , For the same input, you can only get the same output
- The feasibility of : The operations described in the algorithm can be realized by executing the basic operation for a limited number of times .
- Input : An algorithm has zero or more inputs , These inputs are taken from a collection of specific objects .
- Input : An algorithm has zero or more inputs , These inputs are taken from a collection of specific objects .
1.3.3 Good algorithm
- correctness . The algorithm should be able to solve the problem correctly
- Readability . The algorithm should have good readability , To help people understand .
- Robustness, . When entering illegal data , The algorithm can respond or process appropriately , Without producing inexplicable output results .
- High efficiency and low storage demand

1.3.4 The measurement of algorithm efficiency

Time complexity
Addition rules : Multinomial addition , Keep only the highest order items , And the coefficient becomes 1
Multiplication rules : Multiple multiplication , All reserved
Constant exponential order

Conclusion 1: Sequentially executed code only affects constant terms , You can ignore Conclusion 2: Just pick a basic operation in the loop and analyze its execution times and n The relationship between Conclusion 3: If there are multiple nested loops , Just focus on the deepest cycle a few times


Spatial complexity
The algorithm works in place —— The memory space required by the algorithm is constant
Spatial complexity = Depth of recursive call

边栏推荐
- Redis-持久化
- Swiftui 4.0's new navigation system
- @Solution to DS ('slave') multi data source compatible transaction problem
- BGP experiment
- The method of implementing simple student achievement management system with C language
- Analysis of thrift serialization protocol
- Modify the default path of Jupiter notebook
- String转为long 类型报错原因:要转为long必须是int、double、float型[通俗易懂]
- First class exercise
- Keras reported an error using tensorboard: cannot stop profiling
猜你喜欢

Redis-Redis在Jedis中的使用

7月29日 ApacheCon|Apache Pulsar 在 vivo 的探索与实践 即将开播

如何只降3D相机不降UI相机的分辨率

@Solution to DS ('slave') multi data source compatible transaction problem
C # read INI file and key value pair operation

Redis-持久化

国产数据库的红利还能“吃”多久?

58 sub station Anju, broker marketing management platform login interface encryption reverse

Getting started with scottplot tutorial: getting and displaying values at the mouse

2022 low voltage electrician examination questions and answers
随机推荐
C语言库函数getchar()怎么使用
First class exercise
String转为long 类型报错原因:要转为long必须是int、double、float型[通俗易懂]
OKR与GRAD
Chi square distribution and gamma function
4、 C language operators
C # read INI file and key value pair operation
58 sub station Anju, broker marketing management platform login interface encryption reverse
&0xffffffff(0x08)
Third class exercise
Hand in hand from 0 to a "Nuggets special attention" Google plug-in, 5000 words detailed vue3 responsive principle, the advantages, disadvantages and choices of several cache read-write schemes, flyin
VTK notes - picker picker summary
Redis redis use in jedis
It's so hot that solar power can't take off? Hello, head
19、 ROS parameter name setting
[Tanabata] Tanabata lonely little frog research edition? The final chapter of Tanabata Festival!
Summarize the knowledge points of the ten JVM modules. If you don't believe it, you still don't understand it
I am using a blog creation tool
Introduction to MITK
为 @CloudStorage 添加了类 @Published 的能力