摘要: 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 阅读全文
posted @ 2018-10-24 22:49 shenqingping 阅读(221) 评论(0) 推荐(0)
摘要: 将一系列给定数字插入一个初始为空的小顶堆H[]。随后对任意给定的下标i,打印从H[i]到根结点的路径。 输入格式: 每组测试第1行包含2个正整数N和M(≤),分别是插入元素的个数、以及需要打印的路径条数。下一行给出区间[-10000, 10000]内的N个要被插入一个初始为空的小顶堆的整数。最后一行 阅读全文
posted @ 2018-10-24 16:12 shenqingping 阅读(194) 评论(0) 推荐(0)
摘要: A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only nodes 阅读全文
posted @ 2018-10-24 15:58 shenqingping 阅读(174) 评论(0) 推荐(0)