当前位置:网站首页>Operations related to sequence table
Operations related to sequence table
2022-07-01 12:23:00 【Between the steps】
**
For the relevant operations of the sequence table
For the relevant operations of the sequence table
**
1、 The first is the initialization of the sequence table ( static state )
At initialization , Define the maximum length ( Like arrays , Can't expand ), And the actual length of the current stored data , Initialization defines the actual length as 0, The subsequent insertion value is incremented ,,

improvement ( Dynamic allocation )
If there's not enough memory , Will expand the space , Copy the original content
( The red line points to the first data element in the sequence table )
From the picture below ( How much space to expand ?)
Define pointer p Point to the first data location , And then use L.data Expand space , Copy the past , The maximum length of the sequence table is updated

Insert operation of sequence table ------------------
We are in the... Of the linear table i Location insert element e Return to update the linear table (&) , Thought is to move backward as a whole , take e Insert in ,

At the same time, we should also judge whether the space is full ,,, Or it is not allowed to insert more than the maximum length !!!!!!
The deletion of the sequence table -------------------
The deletion operation is to delete the i Deduct the value of , The elements behind move forward You can see the parameters (&)
Let's take out the deleted data and wait for it to return
Deletion is the opposite of insertion It's to remove it from the front and move it forward from the back

Search operation of sequence table ------------------
The search of static memory allocation only needs to return return L.data[i-1] that will do ( Pay attention to the i Bit order , An array is data[i-1])
( Search by bit )
Search by value By reference e Compare
By traversing L.data[i] and e Compare , Same return bit order
( According to the value lookup )
边栏推荐
- Technology sharing | MySQL: how about copying half a transaction from the database?
- [datawhale202206] pytorch recommendation system: precision model deepfm & DIN
- Efforts at the turn of the decade
- 强大、好用、适合程序员/软件开发者的专业编辑器/笔记软件综合评测和全面推荐
- The specified service is marked for deletion
- MQ prevent message loss and repeated consumption
- Machine learning - Data Science Library Day 3 - Notes
- What are the PHP FPM configuration parameters
- Friends day 2022
- Self organization is the two-way rush of managers and members
猜你喜欢
![[20211129] configuration du serveur distant du carnet de notes jupyter](/img/7c/79c9fcb91bde75e954dc3ecf9f5afd.png)
[20211129] configuration du serveur distant du carnet de notes jupyter
![[datawhale202206] pytorch recommendation system: multi task learning esmm & MMOE](/img/8f/64fea641730795a2b5252cc2c8cdd2.png)
[datawhale202206] pytorch recommendation system: multi task learning esmm & MMOE

队列的链式存储

C summary of knowledge points 1

自组织是管理者和成员的双向奔赴

How to use opcache, an optimization acceleration component of PHP

IOS interview
![[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 8](/img/16/e1a0a52964c8a55eb729469114fc60.jpg)
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 8

Machine learning - Data Science Library - day two

Chapter 14 signals (IV) - examples of multi process tasks
随机推荐
Le semester manquant
Computer graduation project asp Net hotel room management system VS development SQLSERVER database web structure c programming computer web page source code project
ASTM D 3801固体塑料垂直燃烧试验
被锡膏坑了一把
[shell programming] - shell introductory learning
Dlhsoft Kanban, Kanban component of WPF
Ansible的playbook
91.(cesium篇)cesium火箭發射模擬
[20211129] jupyter notebook remote server configuration
The Missing Semester
(mixed version 1) multiple TXT text to one table
GID:旷视提出全方位的检测模型知识蒸馏 | CVPR 2021
STM32 project practice (1) introduction and use of photosensitive resistor
Onenet Internet of things platform - the console sends commands to mqtt product devices
Onenet Internet of things platform - mqtt product equipment upload data points
C#依赖注入(直白明了)讲解 一看就会系列
GID:旷视提出全方位的检测模型知识蒸馏 | CVPR 2021
Ipv6-6to4 experiment
LeetCode 454. Add four numbers II
消息队列之监控退款任务批处理过程




