当前位置:网站首页>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 )
边栏推荐
- easyexcel的使用
- 栈的应用——括号匹配问题
- NOV Schedule for . Net to display and organize appointments and recurring events
- The Missing Semester
- Pandas reads MySQL data
- [Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 6
- Golang des-cbc
- [speech signal processing] 3 speech signal visualization -- prosody
- Why does the JVM heap memory exceed 32g and pointer compression fail?
- BIM and safety in road maintenance-buildSmart Spain
猜你喜欢

Use set_ Handler filters out specific SystemC wrapping & error messages

【datawhale202206】pyTorch推荐系统:多任务学习 ESMM&MMOE

Build yocto system offline for i.mx8mmini development board

Dlhsoft Kanban, Kanban component of WPF

Powerful, easy-to-use, professional editor / notebook software suitable for programmers / software developers, comprehensive evaluation and comprehensive recommendation

Technology sharing | MySQL: how about copying half a transaction from the database?

91. (chapitre Cesium) simulation de lancement de fusées cesium

Sort out relevant contents of ansible

What are the PHP FPM configuration parameters

栈-------
随机推荐
技术分享 | MySQL:从库复制半个事务会怎么样?
fatal error: execution: 没有那个文件或目录
[Yu Yue education] financial management reference materials of Ningbo University of Finance and Economics
How to install php7 and perform performance test using yum
Summary of JFrame knowledge points 2
Common chart usage of Bi tools
GID:旷视提出全方位的检测模型知识蒸馏 | CVPR 2021
Relationship between accuracy factor (DOP) and covariance in GPS data (reference link)
Build yocto system offline for i.mx8mmini development board
自组织是管理者和成员的双向奔赴
JS reverse | m3u8 data decryption of a spring and autumn network
Interpretation of R & D effectiveness measurement framework
MQ prevent message loss and repeated consumption
比特熊直播间一周年,英雄集结令!邀你来合影!
AI抠图工具
kubernetes之ingress探索实践
Good luck brought by years of persistence
谈思生物直播—GENOVIS张洪妍抗体特异性酶切技术助力抗体药物结构表征
栈-------
Le semester manquant




