cpp线性表

Exercises 2
(1) the following exercises are only for your references
1-1 Describe the advantages and disadvantages of the sequence storage structure (顺序存储结构)
and the linked storage structure (链式存储结构); the difference among the head pointer, the first
node and the first element node. Outline the characteristics of an ordered list (有序表), and the
similarities and differences between a vector (向量 or 数组) and an ordered table, the functions (功
能)of the head pointer variables and the head node.
1-2 Design an algorithm to delete ith element in a vector, and estimate its time efficiency.
1-3 Try to design an algorithm for getting the node number and deleting the first node in a circular
linked list (循环链表).
1-4 Knowing that the elements in the linear list L= (a1, a2, …, an) is ordered increasingly, and using
a vector to store data, try to writing an algorithm to delete the elements between c and d (c≦d) in
the linear list L= (a1, a2, …, an).
1-5 Assuming that the length of a circular linked list is larger than 1, which has no head node or
head pointer, p is a pointer to some node in the circular linked list, try to write an algorithms to
delete the precursor node (直接前趋结点) of the node pointed by p.
1-6 In a double linked list (双向链表), implement the following basic operations for the double
linked list: ①Initialize; ②Locate; ③Insert; ④delete.
1-7 Knowing a linked list as shown in Fig.1.1, try to write an algorithm to make a backup for the
linked list.
在这里插入图片描述
在这里插入图片描述

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值