
C语言数据结构--二
最爱吃豆腐
奋斗啊,努力啊
展开
-
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 · 49817 阅读 · 0 评论 -
判断输入的二叉树是否是一致
给定一个插入序列就可以唯一确定一棵二叉搜索树。然而, 。 一棵给定的二叉搜索树却可以由多种不同的插入序列得到。 例如,按照序列{2, 1, 3}和{2, 3, 1}插入初始为空的二叉搜索树, 都得到一样的结果。 问题:对于输入的各种插入序列,你需要判断它们是否能 。 生成一样的二叉搜索树。 题意理解输入样例:4 2 3 1 4 2 3 4 1 2 3 2 4 1 2 1原创 2017-09-30 16:21:35 · 2885 阅读 · 0 评论 -
Reversing Linked List
Reversing Linked List(25 分) Given 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, then you must原创 2017-10-01 20:04:25 · 8079 阅读 · 0 评论 -
Root of AVL Tree 平衡二叉树C语言完成
树5 Root of AVL Tree(25 分)An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more原创 2017-10-10 09:58:30 · 1997 阅读 · 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 · 23730 阅读 · 0 评论 -
优先队列 -- 大顶堆,小订堆
什么是堆(Heap) 优先队列(Priority Queue):特殊的”队列”,取出元素的顺序优先权的大小,而不是元素在队列的先后顺序;1.使用完成二叉树; 2.数组表述;堆中的路径(25 分) 将一系列给定数字插入一个初始为空的小顶堆H[]。随后对任意给定的下标i,打印从H[i]到根结点的路径。输入格式:每组测试第1行包含2个正整数N和M(≤1000),分别是插入元素的个数、以及需要原创 2017-10-17 11:05:10 · 9933 阅读 · 0 评论