
浙大数据结构
最爱吃豆腐
奋斗啊,努力啊
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
File Transfer
We have a network of computers and a list of bi-directional connections.Each of these connections allows a file transfer from one computer to another. Is is possible to send a file from any computer on原创 2017-10-17 10:54:24 · 50041 阅读 · 0 评论 -
浙大数据结构题目
线性结构4 Pop Sequence(25 分) Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is a pos原创 2017-10-01 20:11:17 · 1403 阅读 · 0 评论 -
两个有序链表序列的合并
线性结构1 两个有序链表序列的合并 本题要求实现一个函数,将两个链表表示的递增整数序列合并为一个非递减的整数序列。函数接口定义:List Merge( List L1, List L2 ); 其中List结构定义如下:typedef struct Node *PtrToNode; struct Node { ElementType Data; /* 存储结点数据 */ Pt原创 2017-10-01 20:26:37 · 1955 阅读 · 0 评论 -
浙大数据结构-HuffMan Code
树9 Huffman CodesIn 1953, David A. Huffman published his paper “A Method for the Construction of Minimum-Redundancy Codes”, and hence printed his name in the history of computer science. As a professor原创 2017-10-19 12:42:07 · 23748 阅读 · 0 评论 -
邻接矩阵和邻接图
/* 图的邻接矩阵表示法 */#define MaxVertexNum 100 /* 最大顶点数设为100 */#define INFINITY 65535 /* ∞设为双字节无符号整数的最大值65535*/typedef int Vertex; /* 用顶点下标表示顶点,为整型 */typedef int WeightType; /* 边的权原创 2017-10-27 20:08:24 · 4178 阅读 · 1 评论 -
浙大题--旅游规划
旅游规划(25 分)有了一张自驾旅游路线图,你会知道城市间的高速公路长度、以及该公路要收取的过路费。现在需要你写一个程序,帮助前来咨询的游客找一条出发地和目的地之间的最短路径。如果有若干条路径都是最短的,那么需要输出最便宜的一条路径。输入格式:输入说明:输入数据的第1行给出4个正整数N、M、S、D,其中N(2≤N≤500)是城市的个数,顺便假设城市的编号为0~(N−1);M是高速公路的条数;S是出发原创 2017-11-07 17:57:49 · 4278 阅读 · 0 评论 -
优先队列 -- 大顶堆,小订堆
什么是堆(Heap) 优先队列(Priority Queue):特殊的”队列”,取出元素的顺序优先权的大小,而不是元素在队列的先后顺序;1.使用完成二叉树; 2.数组表述;堆中的路径(25 分) 将一系列给定数字插入一个初始为空的小顶堆H[]。随后对任意给定的下标i,打印从H[i]到根结点的路径。输入格式:每组测试第1行包含2个正整数N和M(≤1000),分别是插入元素的个数、以及需要原创 2017-10-17 11:05:10 · 9941 阅读 · 0 评论 -
使用双向链表的形式完成:Reversing Linked List
本题其实考察额是链表的游标实现Reversing Linked ListGiven a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K=3,...原创 2018-06-25 11:05:00 · 2068 阅读 · 0 评论