实验报告
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
中国计量学院
实验报告
课程名称:算法与数据结构
班级:_________________
学号:_________________
姓名:_________________
实验日期:2013.12.24 - 2014.1.2
1. Given two polynomials, P1 and P2, write a program to compute P1+P2, using a linked list implementation.
[Insert your code here]
2. Write a program to evaluate a postfix expression.
[Insert your code here]
3. Since a binary search tree with N nodes has N+1 NULL pointers, half the space allocated in a binary search tree for pointer information is wasted. Suppose that if a node has a NULL left child, we make its left child point to its inorder predecessor, and if a node has a NULL right child, we make its right child point to its inorder successor. This is known as a threaded tree and the extra pointers are called threads. Write routines to perform insertion and deletion into a tree threaded in the manner described above.
[Insert your code here]
4. Write and test a program that performs the operations Insert, DeleteMin, BuildHeap, FindMin in a binary heap.
[Insert your code here]
5. As its name implies, Quicksort is the fastest known sorting algorithm in practice. Write a program to implement it. [Insert your code here]
6. Write a program to find a minimum spanning tree for a graph. [Insert your code here]
In Project 1: Performance Measurement, show your role. You need to choose one of the following tables and delete the others: Programmer Tester Report Writer Yes / /
Programmer Tester Report Writer / Yes /
Programmer Tester Report Writer / / Yes