文件名称:linear-list
介绍说明--下载内容均来自于网络,请自行研究使用
在带头结点的单链表h中第i个数据元素之前插入一个数据元素x ,首先需要在单链表中寻找到第i-1个结点并用指针p指示,然后申请一个由指针s 指示的结点空间,并置x为其数据域值,最后修改第i-1个结点,并使x结点的指针指向第i个结点,要在带头结点的单链表h中删除第i个结点,首先要计数寻找到第i个结点并使指针p指向其前驱第i-1个结点,然后删除第i个结点并释放被删除结点空间。-Take the lead junction point of the singly-linked list h prior to the i-th data elements insert a data element x, single linked list, you first need to find the first i-1 junction point and indicated pointer p, and then apply for a pointer s instructions the knot point of space, and set the x its data field values, last modified i-1 nodes, and x node pointer to the i-th node, delete the i-th to take the lead in a single linked list node h node, we must first count and looking to the i-th node pointer p points to its precursor i-1 nodes, then delete the i-th node and release deleted node space.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
linear-list.doc