文件名称:CPP1
介绍说明--下载内容均来自于网络,请自行研究使用
一、顺序表的基本操作实现实验
要求:数据元素类型ElemType取整型int。按照顺序存储结构实现如下算法:
1)创建任意整数线性表(即线性表的元素值随机在键盘上输入)的顺序存储结构(即顺序表),长度限定在25之内;
2)打印/显示(遍历)该线性表(依次打印/显示出表中元素值);
3)在顺序表中查找第i个元素,并返回其值;
4)在顺序表第i个元素之前插入一已知元素;
5)在顺序表中删除第i个元素;
6)求顺序表中所有元素值(整数)之和;
二、链表(带头结点)基本操作实验
要求:数据元素类型ElemType取字符型char。按照动态单链表结构实现如下算法:
1)按照头插法或尾插法创建一个带头结点的字符型单链表(链表的字符元素从键盘输入),长度限定在10之内;
2)打印(遍历)该链表(依次打印出表中元素值,注意字符的输入顺序与链表的结点顺序);
3)在链表中查找第i个元素,i合法返回元素值,否则,返回FALSE;
4)在链表中查找与一已知字符相同的第一个结点,有则返回TRUE,否则,返回FALSE;
5)在链表中第i个结点之前插入一个新结点;
6)在线性表中删除第i个结点;
7)计算链表的长度。
-First, the basic operation of the order of the table to achieve experimental
Requirements: Data element type ElemType take integer int. Storage structure in accordance with the order to achieve the following algorithm:
1) Create an arbitrary integer linear form (ie, the value of a random linear form of the element type on the keyboard) the order of storage structure (ie the order of the table), length
Limited to 25 months
2) Print/display (through) the linear form (followed by print/display the table element values)
3) the table in order to find the i-th element and return its value
4) In order sheet is inserted before the i-th element of a known element
5) In order to remove the table i-th element
6) Find the order of all elements of the table value (integer) and
Second, the list (the lead node) Basic operation test
Requirements: take the character data element types ElemType char. Single-chain structure in accordance with the dynamic algorithm to achieve the
要求:数据元素类型ElemType取整型int。按照顺序存储结构实现如下算法:
1)创建任意整数线性表(即线性表的元素值随机在键盘上输入)的顺序存储结构(即顺序表),长度限定在25之内;
2)打印/显示(遍历)该线性表(依次打印/显示出表中元素值);
3)在顺序表中查找第i个元素,并返回其值;
4)在顺序表第i个元素之前插入一已知元素;
5)在顺序表中删除第i个元素;
6)求顺序表中所有元素值(整数)之和;
二、链表(带头结点)基本操作实验
要求:数据元素类型ElemType取字符型char。按照动态单链表结构实现如下算法:
1)按照头插法或尾插法创建一个带头结点的字符型单链表(链表的字符元素从键盘输入),长度限定在10之内;
2)打印(遍历)该链表(依次打印出表中元素值,注意字符的输入顺序与链表的结点顺序);
3)在链表中查找第i个元素,i合法返回元素值,否则,返回FALSE;
4)在链表中查找与一已知字符相同的第一个结点,有则返回TRUE,否则,返回FALSE;
5)在链表中第i个结点之前插入一个新结点;
6)在线性表中删除第i个结点;
7)计算链表的长度。
-First, the basic operation of the order of the table to achieve experimental
Requirements: Data element type ElemType take integer int. Storage structure in accordance with the order to achieve the following algorithm:
1) Create an arbitrary integer linear form (ie, the value of a random linear form of the element type on the keyboard) the order of storage structure (ie the order of the table), length
Limited to 25 months
2) Print/display (through) the linear form (followed by print/display the table element values)
3) the table in order to find the i-th element and return its value
4) In order sheet is inserted before the i-th element of a known element
5) In order to remove the table i-th element
6) Find the order of all elements of the table value (integer) and
Second, the list (the lead node) Basic operation test
Requirements: take the character data element types ElemType char. Single-chain structure in accordance with the dynamic algorithm to achieve the
(系统自动生成,下载前可以参看下载内容)
下载文件列表
未命名2.cpp
未命名3.cpp
未命名1.cpp
未命名3.cpp
未命名1.cpp