摘要: 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 @ 2021-05-19 21:28 keiiha 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 将一系列给定数字插入一个初始为空的小顶堆H[]。随后对任意给定的下标i,打印从H[i]到根结点的路径。 输入格式: 每组测试第1行包含2个正整数N和M(≤1000),分别是插入元素的个数、以及需要打印的路径条数。下一行给出区间[-10000, 10000]内的N个要被插入一个初始为空的小顶堆的整数。 阅读全文
posted @ 2021-05-19 15:46 keiiha 阅读(105) 评论(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 @ 2021-05-19 10:51 keiiha 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-05-19 00:07 keiiha 阅读(91) 评论(0) 推荐(0) 编辑