文件名称:fk
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:50kb
-
已下载:2次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
1.分别写出下列函数的递归算法和迭代算法,并求出n=10时的函数值。
Fib(n)= n 当n=0或n=1
Fib(n-2)+Fib(n-1) 当n³ 2
2. 假设以带头结点的循环链表表示队列,并且只设一个指针指向队尾元素结点而不设头指针,试编写相应的队列初始化、入队列、出队列和判断队列状态的算法。
利用上述算法完成下面的各操作,并在每一操作后输出队列状态。
1)下列元素逐一入队:5,7,3,8,55 状态:5个元素
2)3个元素出队 状态:2个元素
3)再2个元素出队 状态:队空
4)再1个元素出队 状态:队空(指示下溢)-1, respectively, to write the following function recursive algorithms and iterative algorithms and function values obtained when n = 10. Fib (n) = n when n = 0 or n = 1 fib (n-2)+Fib (n-1) when n2 2. Assumed to take the lead in the circular list of the node that queue, and set a pointer to a team only tail element nodes without head pointer, try to write the queue initialization into the queue, a queue and to determine queue status algorithm. Using the algorithm described above to complete the following operations, after each operation, the output queue status. 1) each of the following elements into the team: 5,7,3,8,55 status: 2) three elements of the five elements dequeue state: 3) two elements dequeue state of two elements: team empty 4) and then 1 elements dequeue status: Team empty (indicating underflow)
Fib(n)= n 当n=0或n=1
Fib(n-2)+Fib(n-1) 当n³ 2
2. 假设以带头结点的循环链表表示队列,并且只设一个指针指向队尾元素结点而不设头指针,试编写相应的队列初始化、入队列、出队列和判断队列状态的算法。
利用上述算法完成下面的各操作,并在每一操作后输出队列状态。
1)下列元素逐一入队:5,7,3,8,55 状态:5个元素
2)3个元素出队 状态:2个元素
3)再2个元素出队 状态:队空
4)再1个元素出队 状态:队空(指示下溢)-1, respectively, to write the following function recursive algorithms and iterative algorithms and function values obtained when n = 10. Fib (n) = n when n = 0 or n = 1 fib (n-2)+Fib (n-1) when n2 2. Assumed to take the lead in the circular list of the node that queue, and set a pointer to a team only tail element nodes without head pointer, try to write the queue initialization into the queue, a queue and to determine queue status algorithm. Using the algorithm described above to complete the following operations, after each operation, the output queue status. 1) each of the following elements into the team: 5,7,3,8,55 status: 2) three elements of the five elements dequeue state: 3) two elements dequeue state of two elements: team empty 4) and then 1 elements dequeue status: Team empty (indicating underflow)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
实验一1陈道远2罗传炜/~$班级.doc
实验一1陈道远2罗传炜/上机作业1递归.c
实验一1陈道远2罗传炜/上机作业2.c
实验一1陈道远2罗传炜/作业1迭代.c
实验一1陈道远2罗传炜
实验一1陈道远2罗传炜/班级.doc
实验一1陈道远2罗传炜/上机作业1递归.c
实验一1陈道远2罗传炜/上机作业2.c
实验一1陈道远2罗传炜/作业1迭代.c
实验一1陈道远2罗传炜
实验一1陈道远2罗传炜/班级.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.