• <顺序表及模拟实现>——《Data Structure in C Train》


    目录

    详细实现链接:

    <顺序表>《数据结构(C语言版)》

    顺序表功能实现(增删查改)《数据结构(C语言版)》

    1.线性表

    2.顺序表实现

    2.1概念及结构

    2.2 接口实现:

    后记:●由于作者水平有限,文章难免存在谬误之处,敬请读者斧正,俚语成篇,恳望指教!

                                                                           ——By 作者:新晓·故知


    详细实现链接:

    <顺序表>《数据结构(C语言版)》

    顺序表功能实现(增删查改)《数据结构(C语言版)》

    1.线性表

    线性表(linear list)是n个具有相同特性的数据元素的有限序列。 线性表是一种在实际中广泛使用的数据结构,常见的线性表:顺序表、链表、栈、队列、字符串...
    线性表在逻辑上是线性结构,也就说是连续的一条直线。但是在物理结构上并不一定是连续的,线性表在物理上存储时,通常以数组和链式结构的形式存储。

    2.顺序表实现

    2.1概念及结构

    顺序表是用一段物理地址连续的存储单元依次存储数据元素的线性结构,一般情况下采用数组存储。在数组上完成数据的增删查改。
    顺序表一般可以分为:
    1. 静态顺序表:使用定长数组存储。
    2. 动态顺序表:使用动态开辟的数组存储。

    2.2 接口实现:

    静态顺序表只适用于确定知道需要存多少数据的场景。静态顺序表的定长数组导致N定大
    了,空间开多了浪费,开少了不够用。所以现实中基本都是使用动态顺序表,根据需要动态
    的分配空间大小,所以下面我们实现动态顺序表。

     

     静态顺序表测试示例:

    SeqList.h:

    1. //#pragma once
    2. #include
    3. #include
    4. /*#ifndef __SEQLIST__H__
    5. #define __SEQLIST__H__
    6. 静态顺序表
    7. //struct SeqList
    8. //{
    9. // int a[10];
    10. // int size;
    11. //};
    12. //缺点:
    13. //1.数组大小定长,不利于变换
    14. //2.类型固定,不利于变换
    15. //静态顺序表
    16. #define N 100
    17. typedef int SQDataType;
    18. //typedef char SQDataType; //可以通过在此处改变类型,实现更换。即“一改全改”,增强程序的可维护性
    19. struct SeqList
    20. {
    21. SQDataType a[N];
    22. int size;
    23. };
    24. void SeqListInit(struct SeqList sl);
    25. #endif*/
    26. 静态顺序表
    27. //struct SeqList
    28. //{
    29. // int a[10];
    30. // int size;
    31. //};
    32. //缺点:
    33. //1.数组大小定长,不利于变换
    34. //2.类型固定,不利于变换
    35. 写法1
    36. 静态顺序表
    37. //#define MAX_SIZE 100
    38. //typedef int SQDataType;
    39. typedef char SQDataType; //可以通过在此处改变类型,实现更换。即“一改全改”,增强程序的可维护性
    40. //
    41. //struct SeqList
    42. //{
    43. // SQDataType a[MAX_SIZE];
    44. // int size;
    45. //};
    46. //
    47. //void SeqListInit(struct SeqList s);
    48. //
    49. 写法2
    50. 静态顺序表
    51. //#define MAX_SIZE 100
    52. //typedef int SQDataType;
    53. typedef char SQDataType; //可以通过在此处改变类型,实现更换。即“一改全改”,增强程序的可维护性
    54. //
    55. //struct SeqList
    56. //{
    57. // SQDataType a[MAX_SIZE];
    58. // int size;
    59. //};
    60. //
    61. //typedef struct SeqList SL;
    62. //void SeqListInit(SL s);
    63. //写法3:
    64. //静态顺序表
    65. #define MAX_SIZE 100
    66. typedef int SQDataType;
    67. //typedef char SQDataType; //可以通过在此处改变类型,实现更换。即“一改全改”,增强程序的可维护性
    68. typedef struct SeqList
    69. {
    70. SQDataType a[MAX_SIZE]; //顺序表存储方式——数组
    71. int size; //顺序表已使用容量
    72. }SL;
    73. //静态顺序表缺点:
    74. //1.数组大小定长,不利于变换
    75. //2.类型固定,不利于变换
    76. //即:给少了不够用,给多了浪费,不能灵活控制
    77. //顺序表初始化
    78. //void SeqListInit(SL s);
    79. void SeqListInit(SL* ps);
    80. //顺序表尾插数据
    81. void SeqListPushBack(SL* ps, SQDataType x);
    82. //顺序表头插数据
    83. void SeqListPushFront(SL* ps, SQDataType x);
    84. //顺序表尾删数据
    85. void SeqListPopBack(SL* ps);
    86. //顺序表头删数据
    87. void SeqListPopFront(SL* ps);
    88. //打印函数
    89. void Print(SL* ps);

     SeqList.c:

    1. #include"SeqList.h"
    2. //顺序表初始化
    3. void SeqListInit(SL* ps)
    4. {
    5. memset(ps->a,0,sizeof(SQDataType) * MAX_SIZE); //将数组a按字节初始化
    6. ps->size = 0;
    7. }
    8. //打印函数
    9. void Print(SL* ps)
    10. {
    11. for (int i = 0; i < ps->size; i++)
    12. {
    13. printf("%d ", ps->a[i]);
    14. }
    15. printf("\n");
    16. }
    17. //顺序表尾插数据
    18. void SeqListPushBack(SL* ps, SQDataType x)
    19. {
    20. if (ps->size >= MAX_SIZE)
    21. {
    22. printf("SeqList is FULL!\n");
    23. return;
    24. }
    25. ps->a[ps->size] = x;
    26. ps->size++;
    27. //size++在后面多加一次,是为区分数组下标与个数不同步,数组下标从0开始,而size是已使用容量个数
    28. }
    29. //顺序表头插数据
    30. void SeqListPushFront(SL* ps, SQDataType x){}
    31. //顺序表尾删数据
    32. void SeqListPopBack(SL* ps){}
    33. //顺序表头删数据
    34. void SeqListPopFront(SL* ps){}

     Test.c:

    1. #include "SeqList.h"
    2. void TestSeqList1()
    3. {
    4. SL sl;
    5. SeqListInit(&sl); //实参传地址给形参,形参使用指针接收
    6. SeqListPushBack(&sl,2);
    7. SeqListPushBack(&sl,0);
    8. SeqListPushBack(&sl,2);
    9. SeqListPushBack(&sl,2);
    10. Print(&sl);
    11. }
    12. int main()
    13. {
    14. TestSeqList1();
    15. return 0;
    16. }

    动态顺序表:

    SeqList.h:

    1. #pragma once
    2. #define _CRT_SECURE_NO_WARNINGS
    3. #include
    4. #include
    5. #include
    6. #include
    7. //静态顺序表
    8. ///*#ifndef __SEQLIST__H__
    9. //#define __SEQLIST__H__
    10. //
    11. //
    12. //静态顺序表
    13. struct SeqList
    14. {
    15. int a[10];
    16. int size;
    17. };
    18. 缺点:
    19. 1.数组大小定长,不利于变换
    20. 2.类型固定,不利于变换
    21. //
    22. 静态顺序表
    23. //#define N 100
    24. //typedef int SQDataType;
    25. typedef char SQDataType; //可以通过在此处改变类型,实现更换。即“一改全改”,增强程序的可维护性
    26. //
    27. //struct SeqList
    28. //{
    29. // SQDataType a[N];
    30. // int size;
    31. //};
    32. //
    33. //void SeqListInit(struct SeqList sl);
    34. //
    35. //#endif*/
    36. //
    37. //
    38. //
    39. //静态顺序表
    40. struct SeqList
    41. {
    42. int a[10];
    43. int size;
    44. };
    45. 缺点:
    46. 1.数组大小定长,不利于变换
    47. 2.类型固定,不利于变换
    48. //
    49. //写法1:
    50. //静态顺序表
    51. #define MAX_SIZE 100
    52. typedef int SQDataType;
    53. //typedef char SQDataType; //可以通过在此处改变类型,实现更换。即“一改全改”,增强程序的可维护性
    54. struct SeqList
    55. {
    56. SQDataType a[MAX_SIZE];
    57. int size;
    58. };
    59. void SeqListInit(struct SeqList s);
    60. //写法2:
    61. //静态顺序表
    62. #define MAX_SIZE 100
    63. typedef int SQDataType;
    64. //typedef char SQDataType; //可以通过在此处改变类型,实现更换。即“一改全改”,增强程序的可维护性
    65. struct SeqList
    66. {
    67. SQDataType a[MAX_SIZE];
    68. int size;
    69. };
    70. typedef struct SeqList SL;
    71. void SeqListInit(SL s);
    72. //
    73. 写法3
    74. 静态顺序表
    75. //#define MAX_SIZE 100
    76. //
    77. //typedef int SQDataType;
    78. typedef char SQDataType; //可以通过在此处改变类型,实现更换。即“一改全改”,增强程序的可维护性
    79. //
    80. //typedef struct SeqList
    81. //{
    82. // SQDataType a[MAX_SIZE]; //顺序表存储方式——数组
    83. // int size; //顺序表已使用容量
    84. //}SL;
    85. 静态顺序表缺点:
    86. 1.数组大小定长,不利于变换
    87. 2.类型固定,不利于变换
    88. 即:给少了不够用,给多了浪费,不能灵活控制
    89. //
    90. //
    91. //
    92. //
    93. //
    94. 顺序表初始化
    95. void SeqListInit(SL s);
    96. //void SeqListInit(SL* ps);
    97. //
    98. 顺序表尾插数据
    99. //void SeqListPushBack(SL* ps, SQDataType x);
    100. 顺序表头插数据
    101. //void SeqListPushFront(SL* ps, SQDataType x);
    102. 顺序表尾删数据
    103. //void SeqListPopBack(SL* ps);
    104. 顺序表头删数据
    105. //void SeqListPopFront(SL* ps);
    106. 打印函数
    107. //void Print(SL* ps);
    108. //
    109. //动态顺序表
    110. typedef int SQDataType;
    111. typedef struct SeqList
    112. {
    113. SQDataType* a; //顺序表存储方式——数组
    114. int size; //顺序表已使用容量
    115. int capacity; //顺序表总容量
    116. }SL;
    117. //顺序表初始化
    118. //void SeqListInit(SL s);
    119. void SeqListInit(SL* ps);
    120. //顺序表打印
    121. void SeqLisPrint(SL* ps);
    122. //顺序表尾插数据
    123. void SeqListPushBack(SL* ps, SQDataType x);
    124. //顺序表头插数据
    125. void SeqListPushFront(SL* ps, SQDataType x);
    126. //顺序表尾删数据
    127. void SeqListPopBack(SL* ps);
    128. //顺序表头删数据
    129. void SeqListPopFront(SL* ps);
    130. //指定位置插入数据
    131. void SeqListInsert(SL* ps, int pos, SQDataType x);
    132. //指定位置删除数据
    133. void SeqListErase(SL* ps, int pos);
    134. //销毁、释放内存空间
    135. void SeqListDestroy(SL* ps);
    136. //顺序表查找
    137. int SeqListFind(SL* ps, SQDataType x);
    138. //顺序表修改
    139. void SeqListModify(SL* ps, int pos,SQDataType x);

       SeqList.c:

    1. #include"SeqList.h"
    2. //顺序表初始化
    3. void SeqListInit(SL* ps)
    4. {
    5. ps->a = NULL;
    6. ps->size = 0;
    7. ps->capacity = 0;
    8. }
    9. //顺序表打印
    10. void SeqLisPrint(SL* ps)
    11. {
    12. for (int i = 0; i < ps->size; i++)
    13. {
    14. printf("%d ", ps->a[i]);
    15. }
    16. printf("\n");
    17. }
    18. //封装一个检查增容函数
    19. void SeqListCheckCapacity(SL* ps)
    20. {
    21. //空间满了,就扩容
    22. if (ps->size == ps->capacity)
    23. {
    24. int newcapacity = ps->capacity == 0 ? 4 : ps->capacity * 2; //防止最初capacity为0,ps->capacity * 2之后仍为0
    25. SQDataType* tmp = (SQDataType*)realloc(ps->a, newcapacity * sizeof(SQDataType));
    26. if (tmp == NULL)
    27. {
    28. printf("扩容失败!\n");
    29. exit(-1);
    30. }
    31. else
    32. {
    33. ps->a = tmp;
    34. ps->capacity = newcapacity;
    35. }
    36. }
    37. }
    38. 1.顺序表尾插数据
    39. //void SeqListPushBack(SL* ps, SQDataType x)
    40. //{
    41. // //1.自己实现检查并增容
    42. // 空间满了,就扩容
    43. // //if (ps->size == ps->capacity)
    44. // //{
    45. // // int newcapacity = ps->capacity == 0 ? 4 : ps->capacity * 2; //防止最初capacity为0,ps->capacity * 2之后仍为0
    46. // // SQDataType* tmp = (SQDataType*)realloc(ps->a, newcapacity * sizeof(SQDataType));
    47. // // if (tmp == NULL)
    48. // // {
    49. // // printf("扩容失败!\n");
    50. // // exit(-1);
    51. // // }
    52. // // else
    53. // // {
    54. // // ps->a = tmp;
    55. // // ps->capacity = newcapacity;
    56. // // }
    57. // //}
    58. // //2.附用SeqListCheckCapacity(SL* ps)函数
    59. // SeqListCheckCapacity(ps);
    60. // ps->a[ps->size] = x;
    61. // ps->size++; //size++在后面多加一次,是为了区分数组下标与个数不同步,数组下标从0开始,而size是已使用容量个数
    62. //
    63. //}
    64. //2.顺序表尾插数据——附用SeqListInsert
    65. void SeqListPushBack(SL* ps, SQDataType x)
    66. {
    67. assert(ps);
    68. SeqListInsert(ps, ps->size, x);
    69. }
    70. 1.顺序表头插数据
    71. //void SeqListPushFront(SL* ps, SQDataType x)
    72. //{
    73. // SeqListCheckCapacity(ps);
    74. // int end = ps->size - 1;
    75. // while (end >= 0)
    76. // {
    77. // ps->a[end + 1] = ps->a[end];
    78. // --end;
    79. // }
    80. // ps->a[0] = x;
    81. // ps->size++;
    82. //}
    83. //2.顺序表头插数据——附用SeqListInsert
    84. void SeqListPushFront(SL* ps, SQDataType x)
    85. {
    86. assert(ps);
    87. SeqListInsert(ps, 0, x);
    88. }
    89. 1.顺序表尾删数据
    90. //void SeqListPopBack(SL* ps)
    91. //{
    92. // assert(ps->size > 0);
    93. // ps->size--;
    94. //}
    95. //2.顺序表尾删数据——附用SeqListErase
    96. void SeqListPopBack(SL* ps)
    97. {
    98. assert(ps);
    99. SeqListErase(ps, ps->size - 1);
    100. }
    101. 1.顺序表头删数据
    102. //void SeqListPopFront(SL* ps)
    103. //{
    104. // assert(ps->size > 0);
    105. // int start = 1;
    106. // while (start < ps->size)
    107. // {
    108. // ps->a[start - 1] = ps->a[start];
    109. // ++start;
    110. // }
    111. // ps->size--;
    112. //}
    113. //2.顺序表头删数据——附用SeqListErase
    114. void SeqListPopFront(SL* ps)
    115. {
    116. assert(ps);
    117. SeqListErase(ps, 0);
    118. }
    119. //指定位置插入数据
    120. void SeqListInsert(SL* ps, int pos, SQDataType x)
    121. {
    122. assert(pos <= ps->size);
    123. SeqListCheckCapacity(ps);
    124. int end = ps->size - 1;
    125. while (end >= pos)
    126. {
    127. ps->a[end + 1] = ps->a[end];
    128. --end;
    129. }
    130. ps->a[pos] = x;
    131. ps->size++;
    132. }
    133. //指定位置删除数据
    134. void SeqListErase(SL* ps, int pos)
    135. {
    136. assert(ps);
    137. assert(pos < ps->size);
    138. int start = pos + 1;
    139. while (start < ps->size)
    140. {
    141. ps->a[start - 1] = ps->a[start];
    142. ++start;
    143. }
    144. ps->size--;
    145. }
    146. //销毁、释放内存空间
    147. void SeqListDestroy(SL* ps)
    148. {
    149. assert(ps);
    150. free(ps->a);
    151. ps->a = NULL;
    152. ps->capacity = ps->size = 0;
    153. }
    154. //顺序表查找
    155. int SeqListFind(SL* ps, SQDataType x)
    156. {
    157. assert(ps);
    158. for (int i = 0; i < ps->size; i++)
    159. {
    160. if (ps->a[i] == x)
    161. {
    162. return i;
    163. }
    164. }
    165. return -1;
    166. }
    167. //顺序表修改
    168. void SeqListModify(SL* ps, int pos, SQDataType x)
    169. {
    170. assert(ps);
    171. assert(pos < ps->size);
    172. ps->a[pos] = x;
    173. }

    Test.c:

    1. #include "SeqList.h"
    2. void TestSeqList1()
    3. {
    4. SL sl;
    5. SeqListInit(&sl); //实参传地址给形参,形参使用指针接收
    6. SeqListPushBack(&sl,2);
    7. SeqListPushBack(&sl,0);
    8. SeqListPushBack(&sl,2);
    9. SeqListPushBack(&sl,2);
    10. SeqListPushBack(&sl,0);
    11. SeqListPushBack(&sl,8);
    12. SeqListPushBack(&sl,2);
    13. SeqListPushBack(&sl,7);
    14. SeqLisPrint(&sl);
    15. }
    16. void TestSeqList2()
    17. {
    18. SL sl;
    19. SeqListInit(&sl);
    20. SeqListPushFront(&sl, 2);
    21. SeqListPushFront(&sl, 0);
    22. SeqListPushFront(&sl, 2);
    23. SeqListPushFront(&sl, 2);
    24. SeqListPushFront(&sl, 0);
    25. SeqListPushFront(&sl, 8);
    26. SeqListPushFront(&sl, 2);
    27. SeqListPushFront(&sl, 7);
    28. SeqLisPrint(&sl);
    29. }
    30. void TestSeqList3()
    31. {
    32. SL sl;
    33. SeqListInit(&sl);
    34. SeqListPushFront(&sl, 2);
    35. SeqListPushFront(&sl, 0);
    36. SeqListPushFront(&sl, 2);
    37. SeqListPushFront(&sl, 2);
    38. SeqListPushFront(&sl, 0);
    39. SeqListPushFront(&sl, 8);
    40. SeqListPushFront(&sl, 2);
    41. SeqListPushFront(&sl, 7);
    42. SeqLisPrint(&sl);
    43. SeqListPopBack(&sl);
    44. SeqLisPrint(&sl);
    45. SeqListPopFront(&sl);
    46. SeqLisPrint(&sl);
    47. }
    48. void TestSeqList4()
    49. {
    50. SL sl;
    51. SeqListInit(&sl);
    52. SeqListPushFront(&sl, 2);
    53. SeqListPushFront(&sl, 0);
    54. SeqListPushFront(&sl, 2);
    55. SeqListPushFront(&sl, 2);
    56. SeqListPushFront(&sl, 0);
    57. SeqListPushFront(&sl, 8);
    58. SeqListPushFront(&sl, 2);
    59. SeqListPushFront(&sl, 7);
    60. SeqLisPrint(&sl);
    61. SeqListPopBack(&sl);
    62. SeqLisPrint(&sl);
    63. SeqListPopFront(&sl);
    64. SeqLisPrint(&sl);
    65. }
    66. void TestSeqList5()
    67. {
    68. SL sl;
    69. SeqListInit(&sl);
    70. SeqListPushFront(&sl, 2);
    71. SeqListPushFront(&sl, 0);
    72. SeqListPushFront(&sl, 2);
    73. SeqListPushFront(&sl, 2);
    74. SeqListPushFront(&sl, 0);
    75. SeqListPushFront(&sl, 8);
    76. SeqListPushFront(&sl, 2);
    77. SeqListPushFront(&sl, 7);
    78. SeqLisPrint(&sl);
    79. SeqListInsert(&sl, 5, 1);
    80. SeqLisPrint(&sl);
    81. SeqListInsert(&sl, 7, 1);
    82. SeqLisPrint(&sl);
    83. }
    84. void TestSeqList6()
    85. {
    86. SL sl;
    87. SeqListInit(&sl);
    88. SeqListPushFront(&sl, 2);
    89. SeqListPushFront(&sl, 0);
    90. SeqListPushFront(&sl, 2);
    91. SeqListPushFront(&sl, 2);
    92. SeqListPushFront(&sl, 0);
    93. SeqListPushFront(&sl, 8);
    94. SeqListPushFront(&sl, 2);
    95. SeqListPushFront(&sl, 7);
    96. SeqLisPrint(&sl);
    97. SeqListInsert(&sl, 5, 10);
    98. SeqLisPrint(&sl);
    99. SeqListErase(&sl, 1);
    100. SeqLisPrint(&sl);
    101. }
    102. void TestSeqList7()
    103. {
    104. SL sl;
    105. SeqListInit(&sl);
    106. SeqListPushFront(&sl, 2);
    107. SeqListPushFront(&sl, 0);
    108. SeqListPushFront(&sl, 2);
    109. SeqListPushFront(&sl, 2);
    110. SeqListPushFront(&sl, 0);
    111. SeqListPushFront(&sl, 8);
    112. SeqListPushFront(&sl, 2);
    113. SeqListPushFront(&sl, 7);
    114. SeqLisPrint(&sl);
    115. SeqListInsert(&sl, 5, 10);
    116. SeqLisPrint(&sl);
    117. SeqListErase(&sl, 1);
    118. SeqLisPrint(&sl);
    119. SeqListDestroy(&sl);
    120. }
    121. void TestSeqList8()
    122. {
    123. SL sl;
    124. SeqListInit(&sl);
    125. SeqListPushFront(&sl, 2);
    126. SeqListPushFront(&sl, 0);
    127. SeqListPushFront(&sl, 2);
    128. SeqListPushFront(&sl, 2);
    129. SeqListPushFront(&sl, 0);
    130. SeqListPushFront(&sl, 8);
    131. SeqListPushFront(&sl, 2);
    132. SeqListPushFront(&sl, 7);
    133. SeqLisPrint(&sl);
    134. //查找
    135. int pos = SeqListFind(&sl, 0);
    136. if (pos != -1)
    137. {
    138. printf("查找下标:%d \n", pos);
    139. }
    140. SeqListModify(&sl, 6,9);
    141. SeqLisPrint(&sl);
    142. SeqListDestroy(&sl);
    143. }
    144. int main()
    145. {
    146. TestSeqList1();
    147. TestSeqList2();
    148. TestSeqList3();
    149. TestSeqList4();
    150. TestSeqList5();
    151. TestSeqList6();
    152. TestSeqList7();
    153. TestSeqList8();
    154. return 0;
    155. }
    156. 菜单版
    157. //void menu()
    158. //{
    159. // printf("****************************\n");
    160. // printf("1.头插数据 2.尾插数据\n");
    161. // printf("3.头删数据 4.尾删数据\n");
    162. // printf("5.按值查找数据 6.修改数据\n");
    163. // printf("7.打印数据 -1.退出\n");
    164. // printf("****************************\n");
    165. // printf("请输入你的操作选项:\n");
    166. //}
    167. //int main()
    168. //{
    169. // SL s;
    170. // SeqListInit(&s);
    171. // int option = 0;
    172. // int pos = 0;
    173. // int x = 0;
    174. //
    175. // while (option != -1)
    176. // {
    177. // menu();
    178. // scanf("%d", &option);
    179. // switch (option)
    180. // {
    181. //
    182. // case 1:
    183. // printf("请输入你要头插的数据,以-1结束\n");
    184. // do {
    185. // scanf("%d", &x);
    186. // if (x != -1)
    187. // {
    188. // SeqListPushFront(&s, x);
    189. // }
    190. // } while (x != -1);
    191. // break;
    192. // case 2:
    193. // printf("请输入你要尾插的数据,以-1结束\n");
    194. // do {
    195. // scanf("%d", &x);
    196. // if (x != -1)
    197. // {
    198. // SeqListPushBack(&s, x);
    199. // }
    200. // } while (x != -1);
    201. //
    202. // break;
    203. // case 3:
    204. // SeqListPopFront(&s);
    205. // printf("头删完成!\n");
    206. //
    207. //
    208. // break;
    209. // case 4:
    210. // SeqListPopBack(&s);
    211. // printf("尾删完成!\n");
    212. //
    213. // break;
    214. // case 5:
    215. // printf("请输入你要查找的数据:\n");
    216. // scanf("%d", &x);
    217. // int post = SeqListFind(&s, x);
    218. // if (post != -1)
    219. // {
    220. // printf("查找下标:%d \n", post);
    221. // }
    222. // break;
    223. // case 6:
    224. // printf("请输入你要修改的数据:\n");
    225. // scanf("%d", &x);
    226. // SeqListModify(&s, pos, x);
    227. // break;
    228. // case 7:
    229. // SeqLisPrint(&s);
    230. //
    231. // break;
    232. // default:
    233. // break;
    234. // }
    235. // }
    236. // SeqListDestroy(&s);
    237. // return 0;
    238. //}

    后记:
    ●由于作者水平有限,文章难免存在谬误之处,敬请读者斧正,俚语成篇,恳望指教!

                                                                           ——By 作者:新晓·故知

  • 相关阅读:
    linuxOPS基础_linux命令合集
    使用rem + sass + 媒体查询 进行横竖屏适配移动端项目
    【C++】移动距离
    filp_open
    前端工程化精讲第十二课 打包提效:如何为 Webpack 打包阶段提速?
    网络带宽监控
    在线教育项目【老师服务】
    仿制药的未来商机--个人研发的体会
    RF allure-windows 报告生成
    《动手学深度学习 Pytorch版》 6.4 多输入多输出通道
  • 原文地址:https://blog.csdn.net/m0_57859086/article/details/126552514