当前位置:网站首页>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 )
边栏推荐
- 【datawhale202206】pyTorch推荐系统:多任务学习 ESMM&MMOE
- easyexcel的使用
- GPS 数据中的精度因子(DOP)与协方差之间的关系 (参考链接)
- C#依赖注入(直白明了)讲解 一看就会系列
- [Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 3
- 队列操作---
- Switch basic experiment
- Onenet Internet of things platform - create mqtts products and devices
- kubernetes之ingress探索实践
- [classic example] classic list questions @ list
猜你喜欢

Computer graduation project asp Net attendance management system vs developing SQLSERVER database web structure c programming computer web page source code project

迅为i.MX8Mmini开发板离线构建Yocto系统

The Missing Semester

One year anniversary of bitbear live studio, hero rally order! I invite you to take a group photo!

uniapp 使用 uni-upgrade-center

循环链表--

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

队列操作---

LeetCode力扣(剑指offer 31-35)31. 栈的压入弹出序列32I.II.III.从上到下打印二叉树33. 二叉搜索树的后序遍历序列34. 二叉树中和为某一值的路径35. 复杂链表的复制
![[106] 360 check font - check whether the copyright of local Fonts is commercially available](/img/a7/615e8000647b56f03a6a1d3dd81b6d.jpg)
[106] 360 check font - check whether the copyright of local Fonts is commercially available
随机推荐
Onenet Internet of things platform - the console sends commands to mqtt product devices
【单片机】【数码管】数码管显示
Onenet Internet of things platform - create mqtts products and devices
自组织是管理者和成员的双向奔赴
[Yu Yue education] financial management reference materials of Ningbo University of Finance and Economics
【datawhale202206】pyTorch推荐系统:召回模型 DSSM&YoutubeDNN
Typora adds watermarks to automatically uploaded pictures
[JS advanced] promise explanation
GPS 数据中的精度因子(DOP)与协方差之间的关系 (参考链接)
C knowledge point form summary 2
Leetcode (Sword finger offer) - 58 - ii Rotate string left
Implementation of address book management system with C language
[some notes]
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 4
[classic example] classic list questions @ list
第十四章 信号(四)- 多进程任务示例
[datawhale202206] pytorch recommendation system: precision model deepfm & DIN
指定的服务已标记为删除
队列操作---
How to install php7 and perform performance test using yum




